Fixed bugs in test_mixed_modulestore