fix Issue #731 - position should stay the same after $em->flush()

fix + test