Fixed an error and an off-by-one bug in DSA_SetItem(). This