PT symmetry and shape invariance for a potential well with a barrier