Refactor before_init_poolmanager to avoid short-circuiting.