WP-3413-2 Fixed to use the $node_type from the foreach... ooops