With things like this think about it logically. Did it deny a goal, no as one was immediately scored after. Yes you could say it denied a goal scoring opportunity, but it really didn't as another was presented straight away.
This is why you should always try to give yourself time when there is handling on the line. There is nothing worse than blowing too quickly and then seeing the ball immediately knocked into the goal. You've gone from goal and a caution, and no one really complaining, to upsetting the attacking team by disallowing a goal, and upsetting the defending team by turning the yellow to red. Trust me, I've done this, including in a high profile game with 1,000 spectators, and you just want the ground to open up and swallow you.