Here Nephi’s brothers are referring to the people in Jerusalem, who (as far as they know) have not yet been destroyed but who are initially referred to in the past tense (“the people which were in the land of Jerusalem were a righteous people”). But since these people may still exist, the brothers also refer to them in the present tense: “for they keep the statutes ... wherefore we know that they are a righteous people”. Under the influence of the preceding were, the 1830 typesetter changed the nearby present-tense keep to the past-tense kept but left unchanged the present-tense are (which is some distance away and occurs immediately after the present-tense know). There is really nothing wrong with this shifting from the past to the present within this passage, and therefore the critical text will restore the original keep. For another example of this kind of tense shifting, see 2 Nephi 25:1–2.
Summary: Restore the present-tense keep in 1 Nephi 17:22 since it is the reading of the manuscripts and is perfectly acceptable, despite its coming right after a past-tense were.