Stop task acumulation

Change-Id: I9bbf24c722e5bbad8e3e3d189af5f172a0efa85f
Signed-off-by: Dawid Pakuła <zulus@w3des.net>
diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/LuceneSearchEngine.java b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/LuceneSearchEngine.java
index efd826b..e457105 100644
--- a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/LuceneSearchEngine.java
+++ b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/LuceneSearchEngine.java
@@ -258,13 +258,15 @@
 
 		}
 		if (searchForDecls) {
+			tasks.clear();
 			for (String container : containers) {
 				tasks.add(new SearchTask(elementType, qualifier, elementName,
 						parent, trueFlags, falseFlags, false, matchRule,
 						scripts, container));
 			}
-			tasks.stream().map(ForkJoinTask::fork).forEach(t -> t.join()
-					.stream().forEach(m -> searchMatchHandler.handle(m, true)));
+			tasks.stream().map(ForkJoinTask::fork)
+					.forEach(t -> t.join().stream()
+							.forEach(m -> searchMatchHandler.handle(m, false)));
 		}
 	}