This avoids copy cost on local vars where we only read.
Fixes: lp:1813328 * https://bugs.launchpad.net/kicad/+bug/1813328