Issue #1154382 followup by plach: Fixed several issues with the newly-added hook_entity_view_mode_alter().