Israel court orders barrier rerouted in flashpoint village