Duplicating a symbol while placing it causes more to appear when tool is escaped

Duplicating a symbol immediately after placing it without escaping place component causes one or more to appear when tool is escaped

Steps to reproduce

  1. Place a symbol
  2. Press ctrl D
  3. Place the symbol
  4. Press ESC

ezgif-2-63ef800b24

KiCad Version

Application: KiCad (64-bit)

Version: (6.99.0-4976-g75a4de4744), release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.12.1
	HarfBuzz 5.0.1
	FontConfig 2.14.1
	libcurl/7.86.0-DEV Schannel zlib/1.2.13

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

Build Info:
	Date: Dec 16 2022 06:27:17
	wxWidgets: 3.2.1 (wchar_t,wx containers)
	Boost: 1.80.0
	OCC: 7.6.2
	Curl: 7.86.0-DEV
	ngspice: 38
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_SPICE=ON
Edited by Anas Malas