So yeah, I agree it's unnecessary but the tree construction code is really complicated already and I don't want to make it worse by adding many more if (categorized) do_stuff; else do_stuff2;
Knowing the (semi-related) code for the documents list pretty good by now (courtesy of #1812) I don't think it's that bad. But if you truly don't have the desire to look into this now maybe that can be left to a future PR if it's itchy enough for that guy.