Spectral stability of nonnegative selfadjoint operators