Bug fix to support dependencies on sinon.stubs. Return function when dependencies cannot be resolved.