It feels more like the issue is something to do with the routing. I'm not convinced it's routing to the sitemap_xml.php at all. I've adjusted the show_404() to echo "1" and still get a 404 back.
Any other thoughts?
Yes, the default sitemap_xml.php is present and unmodified. No sitemap.xml in the CMS. Is this an additional requirement? I can't find any reference to it.