Fix stack overflow in HandleNode by explicitly limiting the depth of recursion.
Also add a test for a parser with no data