Apply PowerWyrm's fix from #1803, closing it at last.