Fixed bug in plane mesh generator that lead to the mesh being
constantly regenerated inside loops.