Fixed random failure of test caused by randomized ordering of resets in map.

Previously failing test:
TestSingleScopeWithMultipleRegistrationsAndMultipleResets