Fix "~" operator in constant folder.