Okay. So I found, that when I wrap the statement like this:
SELECT *
FROM
(SELECT *,
DENSE_RANK() OVER (PARTITION BY bundesland, regierungsbezirk, kreis, gemeindeverband, gemeinde, election_enum ORDER BY `date` DESC) AS `rank`
FROM `election`
WHERE `date` < NOW()
) tbl;
It suddenly works. Is this a bug?