option-level: perform scan in function, short circuit