Fix TIVI-504 (backport of trac.webkit.org/changeset/144137)