Use query to filter out events with too old start dates. (WIP)

From #6359.