Fix where maps are moved during tests