FIXED: Iterate correctly over the function instructions in each node.