Ensure import hoisting is respected. Need to collect imports at the `Body` node instead of as they are reached via traversal.