Revert "writeLockFile now expects flattened package records"

This reverts commit 60857793188fbad40bf16b65c2cf9f92c836287a.