[issue #11] Fixed inability to resolve optional class-based dependencies in the constructor.