tools: ynl: improve the direct-include header guard logic