Use EntityRef interface rather than SimpleEntityRef implementation.