diff --git a/com32/lib/syslinux/tests/load_linux.c b/com32/lib/syslinux/tests/load_linux.c
index ed973841..751b8b24 100644
--- a/com32/lib/syslinux/tests/load_linux.c
+++ b/com32/lib/syslinux/tests/load_linux.c
@@ -38,8 +38,10 @@ int syslinux_shuffle_boot_rm(struct syslinux_movelist *fraglist,
     while (ml) {
 	addr_t cmdline_addr, last_lowmem_addr;
 
-	if (ml->src != __test_cmdline)
+	if (ml->src != __test_cmdline) {
+	    ml = ml->next;
 	    continue;
+	}
 
 	last_lowmem_addr = __test_cmdline_addr;
 	cmdline_addr = ml->dst;
