Comment 24 for bug 1251590

Thanks Nikola. The patch looks good to me, but tests would certainly be good to help prevent regressions.