Nexus 4 flash stock kernel when it's stuck in bootloader
Use wugfresh's great kit, you can also flash from a bootloop with it and it will find the stock image you select for you

Does a massive amount of other stuff too, root, TWRP recovery etc. I have flashed several custom roms with it

www.wugfresh.com/nrt/

Edit:

Flash from a softbricked/bootloop state