Simplify locals limit calculation.