This fixes #8021.