Fixed a bug in parsing lists that might contain null values. Added
tests for this and some other awkward cases.