Add additional recursion checking/fix recursion checking