This ensures that all records have the same context and thus can be saved together. issue8730 review264421002
and tests scripts with scenario. issue8662 review258231002