How to filter content in Views based on multiple term custom fields?
I have finally found a solution - it's necessary to add another relationship for the same field :

Content: Taxonomy terms on node, Identifier: term
Content: Taxonomy terms on node, Identifier: term2


The second contextual filter should use the second relationship (term2) and then everything works as expected.