Clang parses templates more eagerly than gcc, so it fails on some forward-declared templates. In this case, value_writer was forward-declared and then used in data::cell. As it also uses some definitions local to data::cell, it cannot be defined before it as well as after it. To solve the problem, we define it as a nested class so it can use other local definitions, yet be defined before it is used. No code changes. Closes #7401