Fix for #1735: do not consider underlying types for things we just unboxed
Test for #1735: missing long to int conversion