Invasion pinning in a periodically fragmented habitat