Fix shaded palette bug for certain selections.