Judge rules Montana lawmaker can stay in office