The booking class (BK) mentioned in the ticket coupon and the reservation is what is reported to the miles system. In your example it will report M & I. First check of the FFP is if the reservation BK is any good. Since I is no good, it will then use the ticketed BK (M). If you upgraded via plusgrade or advance cash upgrade, the BK in the reservation changes, so the FFP uses that. If you upgrade at the airport (@carpacchio example above), the both BKs don't change, so the BK in the reservation is used.