Fixes crash when merge values from referenced entities had blank references.