Wouldn't it be more straight forward to just not attach this handler at all when veUIEnabled is false?