get_span(): added warning for cyclic graphs