Marcellus was a total monster, a badass, the fact that even with his flaws he managed to give Hannibal trouble is quite the achievement.
Nevertheless he got out smarted, failing to notice how such an advantageous spot would have been considered beforehand by the guy that had become famous for using terrain advantage costed him.
But really what this does is make Hannibal look even better, he was able to predict that Scipio's victory would give Marcellus the push in confidence needed to venture out and make a careless move, and he capitalized on it.