It sounds like the CI initialization hasn't progressed enough at that point.
Is there a problem having your logic at the beginning of your controller's constructor?
If it is something you want executed for every controller, you could make core/MY_Controller and build on that.