Don't mark types as observed in dumps and when building typed copies.

This prevents logging of AST dumps from affecting the query compiler
semantics and makes ASTs more efficient by avoiding unnecessary
copying of nodes.