Patch Set 1: Looks good to me, but someone else must approve

When I run the BranchAndResetActionTest I still see 3 errors, but when checking out a state before the referenced change, I see the same results. And without this fix, there a 5 errors. So this fix seem to work as expected.