s3:passdb: fix logic in pdb_set_pw_history()