Fix maps race in append and merge tests