The argument for OP_IF/NOTIF should be exactly 0x01 or empty vector in P2WSH. Otherwise, a relay node may replace the argument with arbitrary data. This is now applied as a policy but eventually should become a softfork.
This is not applied to non-segwit scripts because people may have P2SH UTXOs that are not complying with the new rules.