I, too, use foliage to remember what "leaf". However, what I think the problem here is that "leaves" is plural, but "foliage" is singular.
The word for "tree" is "arbo". The word for "trees" is "arboj", but the word for "forest" is "arbaro". The -ar- suffix deals with "a collection of things taken as a whole."
All the same, the true word for "foliage" is "foliaro". "Folio" refers to a single leaf, "folioj" refers to multiple leaves, but "foliaro" refers to a single entity made up of many leaves.
It's like this: "La arboj estas densa" - "The trees are dense" refers to many trees that are each individually dense, although the forest itself may have a lot of room to take a stroll through. However, "La arbaro estas densa" refers to a forest of many trees that are dense and compact altogether, although the trees themselves might be small and thin.
Does this help you with your question?
When translating to Esperanto, it doesn't matter. However, if you're translating from Esperanto, I suppose you should keep the order (unless it makes no sense in English, of course), as you're supposed to keep the translation as close to the intended meaning as possible. In any case, report it if you haven't yet - maybe they'll accept it.
Here it is important as it is also about ensuring that you do do confuse the words. Another example could be "dekstra kaj maldekstra". You know that the words mean "left" and "right", but which of them translates to what?! Is it literally "right and opposite-right" or "left and opposite-left"?!