Rewritten ls handling, so that more than one ls can be specified at each position,
and one can have lsx1lsx4lsx7 at the same time (or similarly lsx3lsx6lsx9).