Drupal 6 not loading all modules before building theme registry
===

We are trying to port the DB and Codebase from one server to the other. Both servers have the same codebase (checked out from the source control), and we have taken the DB dump from server 1 and restored it on server2. 

Now Drupal 6 on server 2 has started to act very strangely by not loading all modules before calling the theme hooks of individual modules. This is causing many issues like colorbox's theme hook depends on the imagecache module's functions while the imagecache module is known to drupal, it is not loaded completely so it results in a failure.

What I want to know is, do you guys think this has something to do with drupal's cache / system module ? I've tried clearing the cache and other stuff that I thought would work but nothing does.

We are using Pressflow 6.2. (Which probably does not change the module / theme loading mechanisms so its all Drupal I guess)

Any hints / clues ?