Apparently this can happen on page navigations. It should be harmless to return anything because if the main frame changes, all execution context are thrown away, but we should return a more reasonable result.
Created attachment 237973 [details] [PATCH] Proposed Fix
<rdar://problem/18312541>
Comment on attachment 237973 [details] [PATCH] Proposed Fix Clearing flags on attachment: 237973 Committed r173547: <http://trac.webkit.org/changeset/173547>
All reviewed patches have been landed. Closing bug.