Senate unexpectedly defeats tax bill