When using REMOVE_WWW_FROM_DOMAIN to remove www from Site.domain, reversing URLs in templates fails

Talked to you briefly on Twitter. Turns out that if you have www.example.com in the Site.domain table, reversing urls fails because it attaches the subdomain to Site.domain, leading to urls looking like subdomain.www.example.com