Judge revokes water permit for mine under Montana wilderness