Fix ugly seems between backgroung images

The seems were introduced by careless refactoring, removing sorting of
background images.