Something is causing recursions, and your goal is to find what it is.
The easiest way is to debug... set a break point in /var/www/tanuki/cake/libs/folder.php on line 261, run the script, and analyse call stack for something unusual, when it hits breakpoint.
On the other hand, recursion might be caused by internal errors. You can override system and your custom error handlers with appError() method on AppController class:
public function appError($method, $messages)
{
die('Application error: called handler method '.$method);
}
This will give you a hint on what missing part (eg. file or class of component, element, etc.) caused recursion.