Fixed error when copying caching ASTs.