Fixes update when entity has ref type(s) and entity instance is from datomic.