Issue #2204273 by DanChadwick: Analysis incorrect for negative numbers.