Thank you, Scanno - I downloaded and installed, just finished the tests.
BTW: To quickly change RILs I did the following: mkdir /data/local/ril-test && mv /system/lib/original-libhuaweigeneric-ril.so /data/local/ril-test && ln -s /data/local/ril-test/libhuaweigeneric-ril.so /system/lib/libhuaweigeneric-ril.so , ln -s /data/local/ril-test/original-libhuaweigeneric-ril.so /data/local/ril-test/libhuaweigeneric-ril.so , so that I just need to change that last link, if I want to switch RILs. Is there a better or preferred method?
I tested this by deleting all messages from a SIM card, but the off-by-one problem persisted. I then used a brand new SIM and everything work perfect. I then shut down the tablet, removed and reinserted the SIM, started the tablet: Off-by-one error was back.
On a side note, your algorithm to detect swapped audio nibbles now works close to perfect, the tablet is now a really usable phone.