OnDemandList: Clean up overcomplicated logic and an unused variable

Thanks @csnover and @neonstalwart for the respective suggestions.