WP-2874 Applying a patch for entityreference.