Fix scan handling of error when on CVM.
Merge pull request #2367 from abergeron/fix_scan_error

Fix scan handling of error when on CVM.