Previous and Next with FilterBy

Currently I’m struggeling with a small problem. My customer wants a next/previous button in each article. No big deal, but the problem is, that when the user has in the overview clicked a filter, it should only prev/next the pages with that active filter.

In this usecase, the “next” page should be one where the filter is found in the field “arbeitsschritte”. I’m not sure how I can manage this. Anybody a idea? (I know the code below doesn’t work, it’s a bit of example)

<?php if ( get('filter-arbeitsschritt') ) : ?>
  <?php $filtered = $page->siblings()->filterBy('arbeitsschritte', get('filter-arbeitsschritt'), ','); ?>
  <?php if ( $filtered->hasNext() ) : ?>
    <a href="<?php echo $page->next()->url(); ?>?filter-arbeitsschritt=<?php echo get('filter-arbeitsschritt'); ?>">Next</a>
  <?php endif; ?>
<?php endif; ?>

Next and prev don’t work with filtered collections, you can use the getNext() and getPrev() methods from my repo here:

Usage: Sorting nextListed