The ongoing court case over the oil and gas field could put Labour and its priorities in conflict.