Add auto-grouping back to layer_line