yeah, that's what happened and if the whistle didn't blow it would have totally counted. but it did blow, and it blew before the puck crossed the line so it's immediately treated as a dead play.
in hockey the whistle is kind of the final thing. it's supposed to stop late hits, hard late shots on relaxed goalies, etc. it goes, all play is dead. any scrums you see after the whistle are usually because a player took exception to this (seriously, see a player take a shot on a goalie after a while and some rough stuff will emerge). so, this is why i'm confused.
was it a premature whistle? yeah. but this happens, maybe once a game, the ref is supposed to call the play dead as soon as they loose sight of the puck, and the ref here blew it because they assumed it was covered an secure, even though it bounced out.