using qualified names while detecting cyclic definitions