Avoid holding lock while adding listeners via the bundle context by double checking in the event dispatcher if the bundle context is still valid. (FELIX-3096)