This fixes #7974.