Fixes issue #4067.