Bash: improve include guard logic