Add tests for variable substitution in more complex data structures.

Because you asked for it!