Fix performance issues when computing benefits with ITreeCodeOverride table