Fix gitfs regression

This was introduced when I added the gitfs whitelists feature recently.
If the base environment is requested, it will not be matched since the
branch name is passed to the _get_tree_* functions.

This should not need to be cherrypicked as the code is newer than 2014.1.0 and thus this regression does not exist in that version. Additionally, it was introduced in feature work which will not be made available until Helium.