If you can't see global templates, this generated warnings for each one

Because Templates uses Next rather than NewItem to implement ACL
checking, ItemsArrayRef returns every global template, but calling Name
will then ACL check and get you undef.

We can add a grep { defined } to the call chain, but then you *still*
get warnings because ItemsArrayRef calls ItemsOrderBy which since Name
is readable, will run sort() on lc($_->Name) which is of course undef
because of the eventual ACL checking.

The fully correct solution is to stop using Next to implement ACL
checks, but in the interest of fixing this warning exposed in RTIR I've
optimized for simplicity over cleverness.  I suspect you can expose the
same issue with Queue Admins who have limit access.
Merge branch '4.2/selecttemplate-warnings' into 4.2-trunk