Instanced Meshes are being offset to weird positions

I’m using the CombineMeshes script from the scripting reference pages…

public class CombineMeshes : MonoBehaviour

{
void Start()
{
Component meshFilters = GetComponentsInChildren();
CombineInstance combine = new CombineInstance[meshFilters.Length];
int i = 0;
while (i < meshFilters.Length)
{

        combine_.mesh = meshFilters*.GetComponent<MeshFilter>().sharedMesh;*_

combine_.transform = meshFilters*.transform.localToWorldMatrix;
//combine.transform = meshFilters.transform.worldToLocalMatrix;_

_meshFilters.gameObject.active = false;
i++;
}
transform.GetComponent().mesh = new Mesh();
transform.GetComponent().mesh.CombineMeshes(combine);
transform.gameObject.active = true;
}
}
…and all is fine and dandy except for this really odd problem.
I have two GameObjects; one with CombineMeshes and another with a model called MeshInstance. MeshInstance sits inside CombineMeshes as a child object.
If I put CombineMeshes at a position of 0, 0, 0 and throw all my meshes inside it, all the instance meshes will be correctly positioned when the game is run. As you would expect…
However.
When I move CombineMeshes to anything other than 0, 0, 0 and run the game, all the instanced meshes are offset and I have no idea why. Take a look at this pic.
![alt text][1]
In this example, CombineMeshes is now at 32, 0, 0 and MeshInstance is at -32, 0, 0. When I run the game, MeshInstance is moved x axis by 32 units (to the right).
Why does it do this?
[1]: http://dl.dropbox.com/u/1008157/Misc/transform-problems.png*_

The reason why the child instances move, is because of the meshFilters*.transform.localToWorldMatrix. This returns a world matrix, which includes the position and rotation of the parent. After combining, the parent matrix is applied again and therefore moves the children further along.*
What you want, is or to combine the meshes when the parent is at 0,0,0, or build a different matrix using [Matrix4x4.TRS][1] and the localPosition, localRotation and localScale of the child object.
[1]: http://unity3d.com/support/documentation/ScriptReference/Matrix4x4.TRS.html

Take your parent transform.worldToLocalMatrix and cross it with each mesh transform.localToWorldMatrix that you’re going to combine.

Good example here http://wiki.unity3d.com/index.php/CombineSkinnedMeshes

The reason that is happening, is because of the meshFilters*.transform.localToWorldMatrix. This matrix is a world matrix and thus includes the position and rotation of the parent. After the combining the parent matrix is applied again.*
To solve this, you can either combine the meshes with the parent at position 0,0,0, or create a different matrix using [Matrix4x4.TRS][1] with the localPosition, localRotation and localScale of the child.
[1]: http://meshFilters*.transform.localToWorldMatrix;*