After applying patches (with plain 'patch' instead of 'git am'), we need to reset the tree to be able to check out the targeted version again.