schema: add IsGlobal and associated tests

`invalid slice index -1 (index must be non-negative)`
/me shakes fist