Fixes some tests, specially a StackOverflow when generating random instances of a recursive type.
Merge remote-tracking branch 'origin/master'