ScheduledMerges: refactor lookups
This separates the cases clearly and also matches the structure of the implementation more closely.