Fixes #4067.