there is actually a solution without any additional regexes. The main problem are not the inner autogenerated *Context classes. They can stay public, because the outer class is pkg private. The problem are more interfaces and their implementations using those private classes in public signatures.
The solution is the following:
I have not much time today to implement this, but this might work. Jack Conradson: If you work on this, can you use my patch as base? I already solved the license issues, so precommit passes, except the visibility problems.
Finally, the VariableContext should be pkg-private, too - it was made public in some earlier commit, but it does not need to be public at all (I think?).