I understand we also need lookupkeys for leaf nodes. I just thought that we could largely simply for this region of code for leaf attributes (since they don't have child schemas or attributes).