This fixes #7824.