Legislation was rejected Monday — a vote that put vulnerable Democrats on the record on the issue during an election year