Revert the changes from bba0a64643c19610dfd896b5151b4aade49a95ca (see #5870)