Fixes #5057.