Top court appointment leaves Spanish judiciary in the dock