unit-tests: Fix test_chunk_eq() if arguments have side-effects