Moved preview termination conditional to earlier in flag_entity_view().