Fixed issue with tests incorrectly calling singleton factories