core: prevent edge case where we could stall if finalize is called after queue is idle. (ie no drain happens to finalize module)