Fix NPE when the bundle context is not given to the dependency within its constructor

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>