build: fix kernel refresh failure on first run