Technically, it's not possible to compile without assertions at the moment because of this check. However, if it would be removed one day then txpackage_tests will start to fail for such builds.
Running txpackage_tests compiled with the check removed and CPPFLAGS="-DNDEBUG":
master: *** 21 failures are detected in the test module "Bitcoin Core Test Suite"
this PR: *** No errors detected