Check the EO numbers to ensure the headers and intake are legal (CARB approved) for the new engine.
www.arb.ca.gov/msprog/aftermkt/devices/amquery.php
If you see both engines' year and size listed on the same EO list, under the same EO number, it would be safe to say you may use the performance modifications on the new engine.
The engine change in general will not cause an issue; so long as all the engine emission components are swapped; including possible transmission components which if not present may trigger the check engine light on. Assuming the engine change is thorough, no check engine light issues are present (no trouble codes triggered/stored), having upgraded from a higher emission output engine to a lower one, is allowed by the state.
Contact the referee's office at (800) 622-7733 prior to beginning the engine change and obtain engine modification verification. Make sure to record the technician's name and phone number for future reference.