Better long casting for LongIntField.

This will fix https://rpm.newrelic.com/accounts/446789/applications/2148787/traced_errors/1748942046.