Changed example filtering to examine example metadata

This allows the filter function to look at the combined metadata of the
example, and all its parent groups, thus allowing groups to be filtered, and
not just examples.