[clang][NFC] Compute current instantiation less frequently in `lookupInBases` (#208139)
While benchmarking I noticed that #118003 causes a small compile-time
regression. Right now, it computes `isCurrentInstantiation` for every
base during name lookup.
We can easily avoid this overhead by only computing it when a dependent
base could actually be skipped.