ElementsAdapter: Fix a crash on a filter being applied while the list was empty