Role of subcycle transition dynamics in high-order-harmonic generation in periodic structures