Fix w3c tests as per Mihai Bălan's review.