Contours of Obama's legacy form with help of unlikely allies