folder_tree_render_icon: Readability cleanup.

Makes the logic easier to debug too.

(cherry picked from commit 759e4b67004e4e70c68fc52338e3de3c304007f6)