Fixes #8795, a reoccurence of #1969