*sighs*
You're right about the crime detection. I hadn't noticed that earlier, but apparently merchant NPCs don't raise an alarm if you're picking a lock.
The strange thing is - the only condition my crime detection had was that NPCs don't use the AI Packages Follow, Escort, Accompany etc with the player as a reference. Merchant NPCs use the AI Package "Travel" without any reference, so they should behave just like any other NPC. However, since they're offering services,
they secretly use a Follow package with the player as a reference anyway.
So instead of the real AI package, the script gets the (kind of wrong) information that the NPC is following the player, and he's excluded from the crime detection (because it's assumed that he's a companion).
Solution: New file is up, the AI package condition has been removed from the crime detection script.
This effectively means that responsible companions
will call the guards if you're picking a lock right in front of them. (Just noticed that the readme still says otherwise... will have to correct that.)
I don't like this solution a lot, but it's better than having merchants, of all NPCs, be totally ignorant of your lockpicking their stores.
What really annoys me is that Zumbs Lockpicking Mod had exactly the same conditions for crime condition, yet nobody in all these years ever noticed this problem...