The logic in 83ae209 (checkout branch: prime cache-tree fully,
2009-04-20) is bogus; checkout can switch branches with a dirty
index and in such a case the tree won't match HEAD.
Add t2014-switch to catch this breakage.
Signed-off-by: Junio C Hamano <gitster@pobox.com>