The affordable housing bill had been passed by bipartisan support, a rare move in a deeply divided US Congress.