Recover nexus 5x with locked bootloader and TWRP I bought a used nexus 5x and got a message saying to lock the bootloader to allow OTA updates.  So I did, not fully understanding what my situation was.  It wiped the phone and now it won't boot.  I can get into TWRP but that's it.  

I tried loading a bullhead factory image (as well as a lineage zip) on a USB-C flash drive from the TWRP install menu but it failed with error 7.

I'm not really sure what to do now.  Is there any way I can get my phone flashed with a working image?  Ideally the factory image.

edit: I should add that I tried the standard flashing instructions but they all start with unlocking with fastboot which doesn't work apparently because i need to check a box in the unbootable OS.

update:
Well, for some reason poking the clear cache button in TWRP fixed it and it booted, I was then able to unlock the boot loader and install the factory rom. Not sure how to evaluate the answers now as I can't test them.
Both locking and unlocking bootloader performs a factory reset on your device on the next boot. This wiping needs stock recovery. You had installed TWRP to the device and since you locked back bootloader. It needed the default recovery to be able to wipe it, since it wasn't there, TWRP tries to wipe, boot and fail, back to TWRP on and on forever. Flashing stock recovery either via fastboot, or flasing software will help it reset hence boot again. If you feel new to this. You can request a full more detailed answer from me and I'll edit this to your convenience.

Note: Flashing software will always download in firmware regardless of the state of that checkbox