6617957 Negation checks logic fixes (mostly for ranges and blocks)