Replace getInDetFlagsForSignature with getFlagsForActiveConfig which does not clone flags unconditionally (and allows caching) and reveals the origin of the cloning for further optimizations.
CC @baines and @ewatton
ATR-26732