Bug2934

This probably doesn't catch all of them, but exercises a good deal more code anyway.