Fix numerous issues with current Behat testing in 2.x branch.