With all of the different issues that are going on with scanSub(), it might be a good idea to just rewrite the whole thing. Some of it is implemented pretty gross at this point, anyway. This is related to issues like #213, #209, #198, #180, and probably even #129.