Issue #2644762 by BenStallings, thekenshow, pifagor: Invalid argument for foreach on entity.inc, line 199.