Fix case of forprimes with begin = 6 returning 5, and add test
signed chars fix for defined-out LMO function