Fix #17: corrected handling of nested lists of homogenous length