[test] Fix dependency on compiler behavior for a couple of tests