thrust::copy_if unconditionally dereferences whole input range

Is it intentionally, that in the following code thrust::copy_if and thrust::transform_if behave differently?

#include <thrust/functional.h>
#include <thrust/transform.h>
#include <thrust/copy.h>

#include <thrust/iterator/transform_iterator.h>
#include <thrust/iterator/discard_iterator.h>

#include <thrust/device_vector.h>

#include <cstdio>

int main()
{
    thrust::device_vector< int > input{5};
    input[0] = 1;
    input[1] = 2;
    input[2] = 3;
    input[3] = 4;
    input[4] = 5;
    thrust::device_vector< int > stencil{input.size()};
    stencil[0] = 0;
    stencil[1] = 1;
    stencil[2] = 0;
    stencil[3] = 1;
    stencil[4] = 0;
    using namespace thrust::placeholders;
    {
        auto f = [] __host__ __device__ (int i) -> int
        {
            printf("%i copy_if\n", i);
            return i * 100;
        };
        auto input_begin = thrust::make_transform_iterator(input.cbegin(), f);
        thrust::copy_if(input_begin, thrust::next(input_begin, input.size()), stencil.cbegin(), thrust::make_discard_iterator(), _1 == 0);
    }
    {
        auto g = [] __host__ __device__ (int i) -> int
        {
            printf("%i transform_if\n", i);
            return i * 100;
        };
        auto input_begin = thrust::make_transform_iterator(input.cbegin(), g);
        thrust::transform_if(input_begin, thrust::next(input_begin, input.size()), stencil.cbegin(), thrust::make_discard_iterator(), thrust::identity< int >{}, _1 == 0);
    }
}

Output:

1 copy_if
2 copy_if
3 copy_if
4 copy_if
5 copy_if
1 transform_if
3 transform_if
5 transform_if

Expected output:

1 copy_if
3 copy_if
5 copy_if
1 transform_if
3 transform_if
5 transform_if

I expected both above calls must be equivalent.
Is it bug in thrust::copy_if implementation?

Here is the project to reproduce the problem: https://github.com/tomilov/mcve/blob/404475340acd7a825800f263fb1ca8ec24d39bda/thrust3/main.cu.

I found very similar issue and now I understand rationale behind mentioned copy_if behaviour. This answer make things clear https://github.com/thrust/thrust/issues/836#issuecomment-336362140