Fixes #3027 Moved gid check to check method