Don't switch layout if an extension is set.

Otherwise you get things like the RSS feed trying to render with a html layout.