tests: fix non-deterministic testMasterModify