Change the filter logic: compile all but merge

Before that change only folders containing an _id were compiled.
This changes that behaviour to compile all folders, excluding the merge
folder, if specified.