Added some testing and some other things for bug #8281.