This is the solution I use:
If Type1 is overlapping Type1
Bring the closest Type1 to the Door
Move this Type1 to the Door
All the rest, Stop moving.
So every time a Type1 is the first on the "line" it will move on, making room for the Type1 right behind it to move next.
<img src="http://s22.postimg.org/m29g9igtt/group_following.png" border="0" />