This bug appears to be at the root of a prior JIRA relating to deserialization which was dismissed as relating simply to a reachability problem
I have a reproducer based on deserialization which led me to identify this fix. The "Not a proxy" issue it reveals is removed by this fix. However, with that fix this second reproducer generates some very arbitrary NullPointerException occurences, whose backtraces show them coming from lines of code which have no associated dereference operations. That's a very strange occurence and suggests that there is indeed something else wrong in the Proxy or Serialization code.