Fix for overzealous where parser.

There process where function was adding table prefixes where it shouldn't have been. This is the fix.
Fix for categories in posts plugin.

Fixes #2418.