Only RewriteLocalhost when not TLD. Fixes #965