Fix traversal of Goto, and refactor shared code into CFGBuilder.