This fixes #8060.  I kind of did it in a round-about way, so I am not sure it will work in all circumstances.  Testing will tell.