Republican infighting defeats US House bill to avert shutdown