Only search for paths inside the *g* node

Otherwise, we might get unwanted paths.