A slight tweak for the templates for bug #8150.  "all" gateways is now before "any" gateways.