I haven’t put too much thought into this yet. A "branch" depth threshold is the first thing that comes to mind, with RBD flattening as an option once that threshold is reached.