I'm not real techy about this stuff but logically speaking, from my point of view, mobilesubstrate plays a part in this. When the device jumps into safe mode, mobilesubstrate is protecting your device therefore disabling items that rely on it. In safe mode, considering Androidlock is a jailbreak tweak, it is disabled. Therefore, I don't believe you can help that. Unless someone knows if androidlock is not dependent on mobilesubstrate? Otherwise, then I don't know.
Edit: I don't know how safe it is to disable mobilesubstrate if that could happen though, just sayin'.