Deleting an object seems to always change all references to it to "unknown"
I noticed that if the object (the variable, the data master etc.) is deleted from the prototype, or if the master mentioning some object is imported to the prototype where the object does not exist (e.g. the variable has not been created yet), all the references to this object will be immediately and forever changed to 'unknown'. Even if you accidentally delete something and then undo this deletion, the references will be still lost and cannot be restored without replacing these 'unknowns' to meaningful references manually - one by one.
Frankly speaking, this makes many operations like moving fragments around through masters or re-importing the data masters from csv very painful, especially with data masters as all the expressions mentioning the fields of the master are immediately rendered unusable after the master is deleted.
Is this by design and I can do nothing with it? If this is so, I would strongly suggest somewhere in future to change this behavior e.g. to leaving dangling references which can be restored to valid after the object is put back in place. This will save a lot of pain! I would better live with errors originated from these references, than to lose all references on deleting the object.
In the meantime, if there is a workaround for this behavior, I would be very glad to know about it, as currently because of this problem I cannot update my data masters from new csv after I initially created them, e.g. when I decide to add new field or the data in the database evolved. And I must very carefully recreate all the variables before importing masters.