Component.GetComponent will return the first component that is found and the order is undefined. If you expect there to be more than one component of the same type, use Component.GetComponents instead, and cycle through the returned components testing for some unique property. ...
I hope I am not too late to help you, but check if there are any missing meshes in your game objects – that’s what was causing a similar problem ( CalcArea.CheckIfNormalized (UnityEngine.MeshFilter temp) (at Assets\LightmappingTools\Editor\CalcArea. ) in my project. ...