Fix recursion detection when rendering variables

Fixes #285
Merge pull request #290 from berarma/3.0

Fix cakephp/debug_kit#285