I have a custom post type with a URL permalink rewrite that seems to work if it uses /mynews/stories/YYYY/mm/story-name but if I change "mm" to the first 3 letters of the month (eg Jan, Feb, Mar, etc), the template hierarchy breaks and it uses index.php.
My code is here http://pastebin.com/RS1DMbB6
I put this all in the functions.php file as I'm not allowed to add plugins.
So the moment I change from %monthnum% to %month%, the URL rewrite works, but the wrong template is being used. Debugging inside the post_type_link hook and template_include tells me is_single is null, and the template seems to go to index.php instead of single-story.php or even single.php.
Any ideas why this seemingly simple change breaks template hierarchy?