The rest of the patch to bug 917348, a=me