map_trees deals with both string and table trees

Fixes #178
Merge pull request #179 from akfidjeland/bugfix-deps-mode-order

map_trees deals with both string and table trees