Flags -Wno-unknown-warning-option -Wno-implicit-fallthrough are not
supported by base GCC, making build fail on GCC-based architectures.
This changes the location of the BAD_TESTS conditional.
PR: 233576
Submitted by: Piotr Kubaj
Approved by: portmgr (tier-2 blanket)