Fix instability of import sorting

@mgsloan