Added is_dag + an ASSERT using it.