Multiple backgrounds: Fix bug with empty variable `$end` and background images

Closes #12.
Closes #16.