Added flag "locked" for protection of geometric data in the shapes (including tolerances). Modification test case to avoid regression.