OFC-1288 - NPE when trying to remove empty entity