BUG: OpenFL 8.4.0 making multiple instances of Main.hx in Flash


Upgraded to OpenFL 8.4 just now and noticed it was creating multiple instances of Main.hx for Flash exports. HTML5 exports do not seem to be affected.

class Main extends Sprite 
	public static var count:Int = 0;
	public function new() 
		trace("Instance count: " + count);
		// Assets:
		// openfl.Assets.getBitmapData("img/assetname.jpg");

When I export the SWF, the output is:
Main.hx:16: Instance count: 1
Main.hx:16: Instance count: 2
Main.hx:16: Instance count: 3


Thanks! Fixed on dev: https://github.com/openfl/openfl/commit/18c399da65136bb3e5e7cd18204912e8dc42f75a