Recent Key object addition broke Root.add_key(): it now adds a dictionary into the internal dict but it should add a Key. This can be tested by adding a metadata.to_dict() after calling Root.add_key() in the tests.
I didn't fix it since I don't know how this is used -- should the function accept a Key as arg?