moved the optional element query into its own nonmember, nonfriend templ...

...ated function for easier, one-line usage.

Fixes the bug introduced by #574 and reduces the amount of times the element tag name must be typed to one (from two, which was the cause of the bug).