Whether or not the undercut play is the one OP is referencing, here's my take on why the refs got it right:
You can be in the process of shooting while going up for a putback dunk/layup. We see this all the time with alley-oops. Same idea applies; you don't have to possess the ball to be shooting. So, getting fouled while attempting a putback is a shooting foul, even before you have the ball, imo.
The shooting foul is first and foremost. It cannot be changed by a subsequent event.
The basket interference occurred after the foul and only negated the chance for an and-1. The basket interference call can't retroactively negate the fact that he was shooting.
Whether or not the tip went in is inconsequential, unless you believe the ball was outside the cylinder when he touched it. I'm still mildly confident the ball did not go in, though. That's my recollection.
The only other play I remember remotely close to this was an alley-oop from Frank to Chukwu late in the 2nd half (or OT?) that he caught just outside the cylinder and finished. I don't remember any whistle for a foul or goaltend on that one. I either missed that whistle and subsequent couple minutes or we're talking about a play I never saw, if we're not taking about the undercut play.