Do not store in transaction cache instances of Reference fields
If the target of the Reference field is deleted, the transaction cache is not cleared because there is no "ON DELETE" support for Reference field. Instead the ids are checked in the Reference.get method.
Closes #12599 (closed)