Gold 883 new ios patch

@jansepar Probably pretty rare, but you might want to guard against the case when there is no `<head>` element.