implement nested implicit line join detection