Fix issue with casts from long/ulong to enum.

I don't really understand why the expression look like it does, but somehow a long -> enum cast becomes long -> enum -> int, which is one cast too much.. In this fix I strip the int cast if it shows up.