Create macro for next_nodes used in lookup family of nodes