Ref #3264 : Fix condition