Restore changes from f79688d that got lost somehow during a merge.