This reverts commit 6578356a. The patch had no effect due to a silly mistake and fixing the mistake causes other problems.