fix dump() recursion detection

only detect recursions for table values.
Merge pull request #1188 from hwhw/master

fix dump() recursion detection