Finish reverting a broken commit in #5679