Since users can define their own (potentially invalid) RDD classes, it might make sense to check for cycles here, otherwise this will hang. Would it be sufficient to just check if `parent == this` and then throw an `IllegalStateException` if it's encountered? It might also be nice to add a unit test for this case.

Indeed, you could encounter an RDD that is its own grandfather, thus defying the laws of time an space.