Revert "Try to streamline lockfile creation"

This reverts commit 6313ba8aef258d0c1c739a7cd0208b05aa9d8f4e.