Thanks, but this is indeed intentional - taking damage or receiving an upgrade "gives you back" all of your jumps.
When taking damage this is so you are less likely to fall into a pit right away (if you're hurt above one), since taking damage stops your movement in the air.
Your air movement continues after the upgrade animation, but I felt the player might be confused after being briefly taken out of the flow of the game and also fall into something.
For similar reasons, both of those cases also make you immune to all damage for a moment.