Fixes: lp:1789390 * https://bugs.launchpad.net/kicad/+bug/1789390
Fixes: lp:1670422 * https://bugs.launchpad.net/kicad/+bug/1670422 (cherry picked from commit 356a767)