liststore: Simplify code
This is also faster, though I doubt anyone's able to measure it.
The previous code was a more complicted way to do the same thing and it was likely written the more complicated way because it fell out commit 758d7073 when fixing https://bugzilla.gnome.org/show_bug.cgi?id=795307