Improved APL logic for checking exclusionlist