I guess this is where you'd write code to make the UI "smart".
Treat the icon, name, pushpin, and arrows as a set of columns.
If there are no arrows in a menu, remove the arrow column making the pushpins right justified.
If there are any arrows in a menu, then have all columns visible.
If all columns are visible and one item does not have an arrow, make the pushpin accept clicks from both the pushpin and arrow columns.