Handle invalid entity IDs in SetReference::getEntityContent

Bug: 46701
Change-Id: I3c9fa8314df050561927daf7aa9a3503c7916b13
Merge "Handle invalid entity IDs in SetReference::getEntityContent"