Revert PR 4835 to fix 4865.