Fixes an issue with revert that was causing new records to be maintained in hasMany