Add regression tests for keys on nested associations

This adds the regressions tests from PR #15893 to master. It's checking that both strings and symbols are accepted as keys for nested associations.
This test name reads strangely to me. Is there a name we can use that better expresses what we're testing? Alternatively, can we test this at a more granular level to make it clearer that what is described in the test name is actually what we're testing?