[eluser]tkrop[/eluser]
I understand the confusion...
This is what happens:
1. CustomLib and customhelper are autoloaded.
2. I call <?=customhelper()?> in code
3. customhelper() creates $CI variable (function scope) by reference
4. customhelper() calls $CI->customlibrary->User() function
5. CustomLibrary constructor creates $CI variable (class scope) by reference
The CustomLibrary->User() function then calls '$this(->user)', which should point to the CustomLibrary instance. However '$this' contains the $CI reference and $this->user only exists in CustomLibrary...