Problem is that when you issue (in-readtable) form, it can alter *readtable-alist*.
it certainly can, but does it? and if it does, then why? let's change it so that it doesn't alter *readtable-alist*!
E.g. let's assume that :foo package is assicitated to :foo-readtable. Then consider the following call sequence in REPL:
(in-package :foo) (in-readtable :bar-readtable)
Then :foo package is associated to bar-readtable.
why? that sounds confusing to me. i see no reason for in-readtable to touch *readtable-alist*.
Also, if there are two source files where package is the same while readtables are different between the files, readtable associtated to package changes implicitly as a side-effect of file compilation or loading.
that should not happen, i consider such a behavior a bug.
E.g. this can occur after we edit either file and then load asdf system which contains both files. Then consider we are going to SLIME REPL and do (in-package). Then we assume that readtable changed implicitly, but it can change to value from either file, in dependence of our editing activity.
*lock-readtable-alist* would protect from this situation.
that's unjustified complexity. plus a concurrency lock would not solve the problem you described above.