So you have narrowed it down to two .40's built on 9mm frames, one of which has a nasty tendency to KB with non-factory ammo.
I own a 92fs, and I love my beretta, and would not trade it for anything other 9mm on the market today. But if I were you, I'd look at HK or Sig for a .40. My information about the beretta 96 MAY be incorrect, but I have heard they can be problematic. I own a USP .40 and love it. Dead nuts accurate, though it does have a high bore axis, and doesnt exactly have a competition trigger...then again neither does glock. But I believe it is one of the ONLY handguns that is offered in both 9mm and .40 that was designed as a .40, and scaled DOWN to 9mm. Not the other way around.
If I am wrong, please correct me. If I had to pick from the two, having shot the Glock 22 quite a bit (my dad owns one), I'd say go for the beretta, if you must stick with one of the two.