I have now read the wiki and the links to the laws in my country. I say you
are wrong.
You have to differentiate between, you make modifications and make them
public. This is illegal.
You make modifications for testing. That is legal if the software still
performs the same task on the computer.
You rewrite the software for better interoperability with what else software
you have on the computer. This is legal if the software still performs the
same task on the computer.
Lets say the copyright owner in front of a court claims, that you are not
testing a modified software version. How does the copyright owner prove that?
I want to see a court ruling saying that you cannot make modifications for
testing.
If you have 2 pieces of software and one of them will only work if you make
modifications to the other, you may do that. And you decide which and how you
want to modify the other piece of software.
I do not know what the gpl says. I have heard Stallman say, take the libre
software and do with it what you want to. That includes making it all or
partly non free. If you want to distribute what you have altered about the
libre piece of software, it also has to be libre software.