The aforementioned function relies on tx.origin:
//If the message sender is not a contract, then there's no need check allowlist
if(msgSender == tx.origin) return true;
There used to be a general guideline to avoid relying on tx.origin under any circumstances.
You can read it here and here (by Vitalik himself).
There might be nothing to it in your specific case, so just FYI.
In particularly, since the purpose at hand (check "if the message sender is not a contract") can be achieved also in other ways.