Etch stop layer, i.e. a buried barrier layer for preventing etching of layers under the etch stop layer