Please add a small automated test to OptimizeTests so that this functionality won't be inadvertently broken by later changes.