Further Scottish court chaos averted