Court service issues apology after black barrister is assumed to be defendant