QFN and QFP footprint wizards error with BOARD_ITEM SetPos()

Description

Trying to use the QFP or QFN footprint wizards werror with this python exception:

image

Steps to reproduce

  1. Open pcbnew
  2. Open footprint editor
  3. Open footprint wizard
  4. Select QFN wizard
  5. boom

KiCad Version

Application: KiCad Footprint Editor x64 on x64

Version: 7.0.2, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1

Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW

	wxWidgets: 3.2.2 (wchar_t,wx containers)
	Boost: 1.81.0
	OCC: 7.6.3
	Curl: 7.88.1-DEV
	ngspice: 40
	Compiler: Visual C++ 1934 without C++ ABI

Build settings:
	KICAD_SPICE=ON