nice little bit to fix tag archive

I was having a problem with tag archive not pulling from custom post types, or from pages (I added a plugin to add tags to pages). After much searching and minor hair loss, I found this:

function post_type_tags_fix($request) {
 if ( isset($request['tag']) && !isset($request['post_type']) )
 $request['post_type'] = 'any'; return $request; }
 add_filter('request', 'post_type_tags_fix');

from here:

And now the archives work. This bit of code goes in functions.php of the child theme.

Using WordPress 3.4.1.