Fixes #5600: Entities are kept out of entity cache during save