flash/stm32l4x: fix segmentation fault with HLA adapters and STM32WLx devices