Fix the themeLink style tag being inserted twice
This is what !122 (closed) was before I messed up trying to fix the style flash.
Because prepareTheme is called on both the first evaluation of the script and on DOMContentLoaded, the <link type="text/css" rel="stylesheet" id="themeLink"> would be created twice, leaving the initial style in the DOM even after the theme changed.