Include category table when needed

Intended to fix joomla/joomla-cms#5000 where banners with matched by tags don't display.

Someone that is more familiar with this code might have a more elegant way of doing this. It works for us on favoritehotelscollection.com: http://favoritehotelscollection.com/places/europe/france-paris.html