source_tree: internal cleanup of 2-stage logic

Cleaned up the internal structure of data passed into _resolve_deps.
This is being done in order to cleanly support more dep attrs