diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c
index a7d62c64784f22e1f86ade881d182c5b10a8e7d6..b347d72cba2e7e65280e88cdfc9add2faf7e99f2 100644
--- a/src/xpdev/ini_file.c
+++ b/src/xpdev/ini_file.c
@@ -1086,6 +1086,8 @@ str_list_t iniReadSectionList(FILE* fp, const char* prefix)
 		if(prefix!=NULL)
 			if(strnicmp(p,prefix,strlen(prefix))!=0)
 				continue;
+		if(strListFind(lp, p, /* case_sensitive */FALSE) >= 0)
+			continue;
 		if(strListAppend(&lp,p,items++)==NULL)
 			break;
 	}
@@ -1115,6 +1117,8 @@ str_list_t iniGetSectionList(str_list_t list, const char* prefix)
 		if(prefix!=NULL)
 			if(strnicmp(p,prefix,strlen(prefix))!=0)
 				continue;
+		if(strListFind(lp, p, /* case_sensitive */FALSE) >= 0)
+			continue;
 		if(strListAppend(&lp,p,items++)==NULL)
 			break;
 	}