Improving setter generation logic.