Massachusetts tribe loses federal appeal in Class II legal battle