merge gateway static check path inversion into a single check