Did you by chance have any modification done to your classes.php file? I hacked it so that I could get empty category pages (with a custom template for that category) to show up instead of getting a 404 error.
When I upgraded to 2.5.1 (from 2.5), I didn’t update the classes.php and that was the culprit. I applied the hack to the new classes.php file, uploaded it, and voila!