would this not even have to be `if (0 !== strpos...`  ? if i understand correctly, you compare if menu root can be anchestor of the id?