Mutiple calls to define with the same daoName would add duplicate entries into the factory system.

- added test to check factory size