Firstly, if you now know that the way you handled something in the past didn’t work well, you shouldn’t repeat the mistake for consistency.
Secondly, if you handle something differently than you did before and the players don’t notice, and the players are fine with the way you’re handling it this time, where’s the harm? (One thing that is important is that you make the players feel free to mention when they think you’re being inconsistent or when something could be handled in a better way.)
Lastly, it is rare for two situations to be completely identical. All a GM needs to do is handle the current situation to the best of his ability regardless of how he may have handled anything in the past.