Fixed #14850 -- Cleaned up duplicate code in admin formset handling.

Thanks apollo13 for the report and review.