Fix expectations requiring with sort attribute