It didn't make sure its Function* stayed valid. Now it does, by keeping a copy of the list of CppDocuments (the snapshot) around.