feature: now allows orphan lines which are not nested to be associated with the nearest parent line.