Fix Inventor slow drawing generation

Solve an issue with Inventor that slows down generating drawings and in Invmark