If it appears to a court that a witness, party or protected confider may have grounds for making an application under this Division or objecting to the production of a document or the adducing of evidence, the court must satisfy itself (or if there is a jury, in the absence of the jury) that the person is aware of the relevant provisions of this Division and has been given a reasonable opportunity to seek legal advice.