Relative stability and stability of closed sets