This comment specifically says that a created stylesheet will fail to function once a link element is added to the document. Based on your fix, I'm assuming you discovered the buggy symptoms exist only as long as the link element is in the document? If that is the case, it would be helpful to get that noted in the commit comment to clarify why this hack was removed.