fixed creating factories, registered listeners while creating proxy with getCache

fixes #4215
we were creating factory of factories, so just removed a bug