Properly daise KeyError for unknow UID, not IndexError