[eluser]TheFuzzy0ne[/eluser]
Everything looks just fine to me. I'm really confused...
What version of PHP are you running? What server are you running (is it XAMPP), and on what OS?
I would suggest hacking the system files, and back-tracing the call, and debugging. The place to start would be _ci_load() in ./system/core/Loader.php. I know it looks a bit daunting, but it's surprisingly simple. Before the variables are extract()ed, you should check $this->_ci_cached_vars to make sure that 'query' is there. And afterwards, check that the $query variable exists after extract() has been called.
Don't forget to replace the system files with the default files when you're done.