Issue #18075 contains a patch. I probably won't have time to commit until sunday, but feel free to apply the patch yourself :-)