Fixed service container failure when handling classes without constructors.