The law, certain to be vetoed by Bush, provides a loophole for leaving any number of troops after April 1, 2008 for anti-terrorist operations in Iraq.