module checkNoModifiedTemplateOfModifiedTemplate {
    type record MyRecordType {
        integer field1 optional,
        charstring field2,
        boolean field3
    }

    template MyRecordType MyTemplate1 := {
        field1 := 123, 
        field2 := "A string", 
        field3 := true
    }

    template MyRecordType MyTemplate2 modifies MyTemplate1 := {
        field1 := omit,  
        field2 := "A modified string"
    }

    // MyTemplate2 is already a modified template
    template MyRecordType MyTemplate3 modifies MyTemplate2 := {
        field1 := 22 
    }

    // this one is even modified two times
    template MyRecordType MyTemplate4 modifies MyTemplate3 := {
        field3 := false
    }

	// NESTED TEMPLATES
	type record MyRecordType2 {
        integer field1 optional,
        charstring field2,
        boolean field3,
        MyRecordType nestedTemplate
    }

    template MyRecordType MyNestedTemplate1 := {
        field1 := 123, 
        field2 := "A string", 
        field3 := true,
        nestedTemplate :={field1:= 1, field2:="a", field3:=true}
    }



    template MyRecordType MyNestedTemplate2 modifies MyNestedTemplate1 := {
        field2 := "B string", 
        nestedTemplate :={field1:= 2, field2:="b", field3:=true}
    }

    template MyRecordType MyNestedTemplate3 modifies MyNestedTemplate2 := {
        field2 := "C string", 
        nestedTemplate :={field1:= 3, field2:="c", field3:=true}
    }
	


}