This can happen when renaming the object that you selected (in your case obj1).
Another situation is when the model reflection is synchronized with the module for the obj1 object was not set. Then the record will be deleted and the reference for the template would be lost.
In older versions of the model reflection module there was an issue with replacing the generated objects. In this old version the record was deleted and a new record was created, thereby all objects using the reference to the object were reset to an empty value.
Only adding a reference should not be the cause of the issue that you are experiencing, and I hope that above options will help you in finding the cause for your issue.