work around Swift bug where reverse() sometimes returned an infinite lazy collection