toPaths and defaultValue seem to have some weird interaction in that running them on the same schema causes a change in the output, even if I use z.clone() before applying either operation.
Although I'm only using these functions, there may be other interactions I've not uncovered.
Reproduction.