Fix for applying edits when related records are retrieved