Merge "st-hal: fix restarting detection after buffer overflow"