Fix bugs related to rendering items in a slot that have bad data. Fix EntityRef.copy() output.
Merge pull request #1188 from Josharias/InventoryUIFixes2

Fix bugs related to rendering items in a slot that have bad data