The higher-derivative theories with degenerate frequencies exhibit BRST symmetry [V.O. Rivelles, Phys. Lett. B 577 (2003) 147]. In the present Letter meaning of BRST-invariance condition is analyzed. The BRST symmetry is related to nondiagonalizability of the Hamiltonian and it is shown that BRST condition singles out the subspace spanned by proper eigenvectors of the Hamiltonian.