I used the patch in the original report for a while, and stumbled on another, related case that emacs doesn't handle. I'm attaching an updated patch that handles both cases (described in the patch). I've also broken up the regex for improved readability.