Avoid infinite loop in shm-kill-region