It seems that make-pins.py does not allow a pin to have 2 names. Eg PB3 is called X17 and SW, but only SW can be used to reference that pin. Looking in pins_PYBV10.c I see that the entry for X17 has its name overwritten by SW, and SW appears twice.