Also, don't use ViewGetLayers() for visibility checking. For some things (like vias) it deals with synthetic layers, not board layers. Fixes https://gitlab.com/kicad/code/kicad/issues/6328
Otherwise things like snapping don't work. Fixes https://gitlab.com/kicad/code/kicad/issues/4147