PLD: fix static analysis check, use when-not