fix(singleton class): Fix singleton class as a injectable class

When providing singleton class as a dependency, we tried to calculate the deepest dependency scope of it and failed due to the class callable is not the function but the class itself.