Make stylesheets load in the correct order.

Add a new flow control function to queue functions without
knowing how big the queue will be.