Additional check for #505. Thanks, @jadwigo.