Move link rel=stylesheet fetching to layout task

Fixes #3346. r? @jdm