Patch to follow.
Created attachment 113301 [details] [PATCH] Suggested solution
Committed r99159: <http://trac.webkit.org/changeset/99159>