Multi Site and Custom Permalinks

WPMU 2.8.6 , subdirectory installation.

When having a blog with custom permalinks on 1.test.com/blog and then switching it to 2.test.com/blog all the posts will break with 404 errors.

Logging into the blog backend , going into the Permalinks menu and clicking update will resolve the issue. The issue will reappear if the blog is switched back to 1.test.com/blog .

Looking deep at the code, something seems to be going wrong with the match rules before the sql query.

Ideas on this being a plugin issue or WPMU bug?

-Jason Potkanski