get_mask bug fix: header<->origin

Fixes a bug in `get_mask` function where a header was passed to `as_region_filter` as `origin` argument.