Well using the 4 x 2 as a spacer, and with the additional offset of the bar, you've got quite a long lever on your screws, which could lead to loosening/slippage/bending.
My suggestion was to use vertical 4x2, with solid fixings towards the top end, and then the flange only needs to screw into...