Localized States in Phase-Matched Doubly-Resonant Second-Harmonic Generation