Horyuji was actually built decades after Prince Shotoku's death in 622.
Horuyuji was built right before Prince Shotoku died. 
mnli hypothesis: Horuyuji was built right before Prince Shotoku died.  premise: Horyuji was actually built decades after Prince Shotoku's death in 622.