Geometry-induced rectification of looped oscillatory flows