Fix bug #2652974. Reverts revision r2326 to previous state.