Fixes #5666

Spot the issue.