Ahead of the vote, the legislation became one of the most contentious veterans bills to reach the House floor in recent years.