Uncaught TypeError: Cannot read property 'hasChanged' of undefined

I just wanted to add to the conversation that i got this same error. The cause was from deleting a model.  The table that was based on the model went away.  And when i looked in the UI to change the models saved from my Save button on the page, the removed model was no longer listed there.  However, when l looked at the XML, the deleted model was still in the XML to be updated by the save button.  So I wanted to report this mismatch between the XML and the UI!   If you have more questions or need clarification, let me know.