Fix performance regression due to buggy domReady