Thanks for reporting the problem. I installed the attached patch in the emacs-24 branch; it should be merged into the master in due course.