My German textbook gives the following solution to an exercise where correct verb forms need to be filled in:
Nachdem das Ziel hatte erreicht werden können, sollen die Sieger gefeiert werden.
I have also found the following sentence online:
Die Pilotin erklärte, warum vor dem Start beim Wetterdienst die Wettervorhersage hatte abgefragt werden müssen.
Question. Why is the conjugated verb not at the end of the auxiliary clause? Should it not be 'Nachdem das Ziel erreicht werden können hatte, ...', so that the verb that changes comes at the end? Isn't it the rule in German?