En offentlig försvarare har förklarats obehörig av en tingsrätt utan att denne först avvisats som ombud/försvarare i målet.