Gracefully fail LockfileParserError and handle empty lockfiles

(see #686)