Fix ABI size of global values, and fix layering violation