Tweak error handling in FIELD SQL function.