[NBG6817] Can't flash master OpenWrt image from stock (19.07.4 works, though)

Just got myself a new Zyxel Armor Z2 (NBG6817) working with OpenWrt, which appears to work better than my WRT3200ACM (that's currently having issues with WPA3 and IoT devices).

However, when I was flashing OpenWrt from stock, I found that the stock system would not allow me to flash an OpenWrt master factory image I've created using ImageBuilder, complaining about "file format is invalid". An OpenWrt 19.07.4 factory image created using ImageBuilder was accepted without issues. So I ended up going from stock to 19.07.4 first, then to master, to get everything working as desired.

I think this might be a regression in master, or maybe due to some breaking changes. But OpenWrt master works fine on this router, just that the installation is not straightforward.