=rem #16428 optimize protobuf serializer for master

#16428 for master
I don't understand why there is a need for two levels of tailrec.
cacheMethod never returns null
either you have the Method immediately and can call it, or you need to lookup&cache it and then call it.