Fixes #5169.