Sverige borde ha tagit höjd för det försämrade säkerhetsläget tidigare.