This adds the additional bits onto the class/include statements to support or detect class recursion. It's not currently supported, but I figured I'd commit the detection code as a variant of the recursion implementation, since I think this is correct, and it was a bit tricky for me to get it right.