Fix compiler errors due to unboxed closures and bitflags.