Loss of contact between an elastic layer and half-space