Fix check that was too restrictive

That was introduced in gh-1210