Fixes #4061.