With the filters
Group results by page
If the results are grouped, the legend div overlays the list of result.
Results are not grouped by page
That's not the case when the changes are not grouped.
Without the filters
The alignement is not related to grouped changes by pages.
Misalignement on some wikis
German Wikipedia has a misaligned legend that overlays the other options.
Same thing on French Wikipedia, that have a customization on the local CSS file.
Correct alignement on other wikis
Catalan Wikipedia is correct: legend is inside of the fieldset and is not overlaying.
That's the same on English Wiktionary, Mediawiki.org, Hebrew Wikipedia.
Note
I haven't seen how much local customisations are impacting the legend.