Fixups for the lockdown patchset. Potentially makes more sense to merge these into the relevant original patches rather than keeping them separate, but sending them for review.