Revert 378248. I changed the logic of this function unitentionally, pointed out...