Judge keeps most Keystone XL pipeline work on hold