LMP: better handling for missing items in GetNextSource().

Fixes #1071 (again).