Get rid of dynamic key discovery stuff. As expected, it's just one more moving part that can break. Code the key in the page.