py: Handle small int power overflow correctly.