Please note that we're changing our answer here. The previous answer ignored the existence of the "Destroyed Location" rule on TW page 124 (easy enough to do, because it's not represented on the Step-By-Step damage process on pages 122-123, and is separated from those rules by a page or two).
The new ruling, currently in print in the new BattleMech Manual and to be entered into TW errata, is as follows:
When a location is destroyed, rather than just damaged, no check for critical hits in that location is made unless it contains one or more explosive slots. In that case, any resulting critical hits that strike explosive slots in that location are resolved as normal; hits that do not are always discarded without transferring.
In other words, you check for crits if you damage a location, but not if you destroy it, unless when it is destroyed it has ammo in it. Even then, any crits that result never transfer.
In terms of the specific scenario given in the original post, the crit chance generated by AP ammo would usually be lost, because the initial location that's damaged is also destroyed at the same time (which usually obviates crit checks for there). The AP ammo crit chance would also not carry over to the location the damage transferred to. However, following the Destroyed Location rule, if the location that is destroyed has ammo, make both the normal crit check and the AP ammo crit check (presuming you damaged armor with the same attack, since AP ammo does not grant a crit check if it only damages structure). Any AP crits in this case would never transfer, just like any regular crits generated in this case.