(#14872) Fix logical error in a test

This patch fixes a logical error in an acceptance test for the
issue described in the respective ticket.