Fix for media search

Media search wasn’t working correctly on media caption.  Rearranged the
joins so we’re joining tags on media rather than media on tags.