[eluser]OverZealous[/eluser]
check_last_query auto outputs to the browser (and still returns the result). Maybe that's your problem? Check the docs for check_last_query. It is not buggy.
Also, if you are debugging, I highly recommend using $this->output->enable_profiler(TRUE); whenever possible. It provides more detail.