loci: link locitest with --whole-archive

This would have caught the duplicate symbols.
diff --git a/c_gen/templates/locitest/Makefile b/c_gen/templates/locitest/Makefile
index 70e57ca..00a2f95 100644
--- a/c_gen/templates/locitest/Makefile
+++ b/c_gen/templates/locitest/Makefile
@@ -10,7 +10,7 @@
 all: locitest
 
 locitest: $(LOCITEST_OBJS) loci.a
-	$(CC) $^ -o $@
+	$(CC) -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
 
 loci.a: $(LOCI_OBJS)
 	ar rc $@ $^