Yes, something like that.
It was in the 90s when Pakistan was facing toughest sanctions.
The one case I am personally aware of was of an airman who fixed a part which had to be sent to USA for repair.
The airman realised that the part stopped working at nearly the same length of time, and guessed it must be a battery. Opened the part and found exactly as he guessed. Changed the battery , and it was singing and dancing.
He proudly told his findings to the officer in command, who bestowed upon him court Martial proceedings.
Reason was that Cartain parts of F-16 were and are declared classified by the manufacturer and no matter how simple to fix or reverse engineer they are, cannot be opened, serviced or fixed by the end user.
The airman who found the simple battery change fix, breached an inter government contract .
Hence the punishment.
Same is the issue with any repairs or replacement or reverse engineering of aircraft parts. All have limitations under contract about what the end user can or cannot do.