Fixes issue #8295. Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Signed-off-by: Damien George <damien@micropython.org>