Fixed remaining issues with branch resolution and checkout caching