locks: fix list insertion when lock is split in two