Ugly permalinks stopped redirecting to pretty URLs

Found the following in a plugin file using grep -Ri 'redirect_canonical' /path/to/wordpress/plugins:

remove_filter('template_redirect', 'redirect_canonical');

That disables WordPress’ built-in canonical URL redirects. Disabling the component of the plugin that contained that line fixed the problem.

Beware the WordPress Mobile Pack’s Mobile Switcher.

Hopefully reaching out to the plugin developer will result in a fix that allows both canonical redirects and mobile template switching. Otherwise I’ll have to find another mobile plugin.