(1) If:
(a) a monitoring warrant was issued on the basis that an interim control order was in force; and
(b) a court subsequently declares the interim control order to be void;
a criminal proceeding does not lie against a person in respect of anything done, or omitted to be done, in good faith by the person:
(c) in the purported execution of the warrant; or
(d) in the purported exercise of a power, or the purported performance of a function or duty, in a case where the purported exercise of the power, or the purported performance of the function or duty, is consequential on the warrant.
(2) Subsection (1) does not apply to a thing done, or omitted to be done, at a particular time if, at that time, the person knew, or ought reasonably to have known, of the declaration.