Optimize QAST node creation.

Worth it since it's a very hot path.