Revert helper function for loading WP, introduced in 25ebf3a1. It causes the brokenness noted in that commit, somehow related to calling require_once inside a function.