(reverse-merged from commit 85ec4064fa6d0b567a3c1f3a7ccd75fcaca8df20)