Right.
I'm sure that's the way the courts will understand it. I don't really see how a Canadian who picks up the law and reads it would be confused by what he's permitted to do or not permitted to do. The same goes for police officers applying this legislation to a particular situation.
It is just a little wording problem that's inherent where you have a defence for conduct. That is an offence, but the defence allows the person to be exonerated.