Fixed remaining test failure in jslex tests.
Fixed #23660 -- Moved sort_dependencies to core.