That's hardly a loophole, that's totally intended and desired behavior. The goal of the GPL is that the programmer who maintains a particular thing has the access and the rights to fix and modify the whole of that thing, if a programmer writes their own (proprietary, internal-only) code they still have access and rights to the whole thing so that's a total GPL success. If they distribute the result of their work than the people they distribute to need to also have access and rights to the whole of the work which is why the GPLs sharing clauses are predicated on distribution.