Optimisation: cache fx group in a thread local.