Issue #2359673 by korgik: Fixed Wrong condition in removeGranularity method.