Fix for applying edits when related records are retrieved

Addresses #43