Fix "undefined local variable or method `http'".
Fix failing tests that arbitrarily relied on sort order.