Yes, this is legal.
In general, any time significant modifications are made to a Robot other than simple repairs, it is a good practice to re-inspect, per R1, quoted below with a portion bolded for emphasis:
<R1> Robots must pass inspection. The Team’s Robot must pass inspection before being allowed to participate in any Matches. Noncompliance with any Robot design or construction rule may result in Disqualification of the Robot at an event.
a. If significant changes are made to a Robot, it must be re-inspected before it will be allowed to participate in a Match.
b. If a Robot has multiple functional configurations, all possible configurations must be inspected before being used in competition.
c. Teams may be requested to submit to random inspections by event personnel during the event. Refusal to submit will result in Disqualification.
d. Referees or inspectors may decide that a Robot is in violation of the rules. In this case, the Team in violation will be Disqualified and the Robot will be barred from the Field until it passes re-inspection.