Fixed #21064 -- Refactored common logic in ModelAdmin.add_view and change_view.