Replace existing value if there is an explicit flatbed value
Updated scan mode and source detection logic
Remove static fallback values and depend on value detection logic