Work on bug #8344.
This fixes #8341.