Android boot loop after fresh install Phone: Nexus 4 with the latest android 5.1.1. 
Accidentally I broke my screen and turned off my phone. After a month my screen was replaced and then I got stuck in the boot loop at the start.

I've made factory reset in both android recovery and TWRP recovery.

I've tried to install popular ROMs (Chroma) and google factory images: all from the latest LMY48M to the old ones. Installation was OK, but after install I have a boot loop (flying dots, or rotating circles, etc - I have been waiting for hours).
I made it to start the system - only with the oldest factory image: JDQ39 (4.2.2)

After android started and some configuration made (wifi, google account), after some time, phone tells me about system update 4.3. I agreed and got stuck in the boot loop again.

I know that there are tons of stuck in boot loop questions, but usually solution is to clean cache, factory reset, or reinstall. And I have boot loop stucking after factory reset and fresh install. Do you have any ideas how to fix this? 

I think, I can live with 4.2.2, but maybe it's possible to get 5.1 working back?

P.S. All installations (adb sideload of ROMs or ./flash-all.sh for factory images) where finished successfully. The only error I got was unable to mount /usb-otg in TWRP while factory reset (anyway it said that reset was done). But I think it's not the reason, isn't it?

Update:
I've tried all factory builds from official source. They come with script that manually run fastboot to flash images:

fastboot flash bootloader bootloader-mako-makoz30f.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.07.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-occam-lmy48m.zip


It always finished with success - no errors. But after restart - boot loop freezes.
Also, I've always made a factory reset before flashing factory images. I've tried both via original recovery.img and via TWRP (with Dalvik cache)

Update2:
Here is my adb logcat on start of working 4.2.2. I've managed to get it only after turning on USB debugging. My question is - will the USB debugging mode reset after wiping data? I want to try install 5.1.1 factory image again and to collect adb logcat data. But if USB debugging option is resetted, then I will have no result again.
Do a factory image flash using fastboot,taking special care to update the partition data,bootloader and radio images. Partition data means the ebr/mbr/preloader partitions. The manual flash implies that you must flash each partition manually, just so that you are sure that everything was flashed correctly, even if the script executed without errors.This should resolve the issue. If it doesn't, maybe a flash using Qualcomm MSMDownloader will work. It would help if you could upload the names of the images in the factory image archive, so that I can find out which partitions may be causing the problem