Fix apparent bug in setNested which sets empty keys in changed object when trying to delete + tests