Undefined offset in plugin handler EntityReference->statesHandler()