This fixes #7787.