code: function find_cycle_root(leaf) {
  				if(leaf.id === submod_sym) {
  					return leaf;
  				} else if(leaf.parent) {
  					return find_cycle_root(leaf.parent);
  				} else {
  					return false;
  				}
  			}
docs: Detect cycles