Fixed whitelist checking when only the secondary whitelist is enabled