Simplify code a bit here to remove the duplication
Needs ReviewPublic

Authored by schwarzer on Wed, Aug 14, 12:01 AM.