The "SM" music/area list handler assumes that any list it's sent will be ordered with areas first, and music after. This is an implementation detail and not part of the spec, but the handler will still break if the order is not the expected one.
Courtroom::fix_last_area() is a ridiculous hack