Adapt to recent changes in FormStateInterface.
Adapted to more Core changes.