Sinn Féin feared move to the right on immigration would leave the party ‘exposed’ in the north, adviser says