Follow up from a similar fix in 426785a19e Fixes issue #6314. Signed-off-by: Damien George <damien@micropython.org>
426785a19e
Fixes issue #7782, and part of issue #6314. Signed-off-by: Damien George <damien@micropython.org>