Fix cakephp/debug_kit#285

I've tried to improve recursion detection by avoiding any false positives.
That would be nice and I think there's some other related improvements and bug fixes that could be done. I've just opened issue #291 and I'd like to have your comments there.