See summary.
Created attachment 30290 [details] Proposed fix.
Committed http://trac.webkit.org/changeset/43666.