Fix for T3286 in new codegen (related to T3132); plus formatting