The short answer is yes.
A contextual analysis of the circumstances based on an objective standard, like that of criminal responsibility, is always required.
Possible factors include the environment, the nature and the quantity of substances consumed, the individual’s state of mind, as well as measures taken to avoid the risk, if any. However, we leave it to the courts to determine if people meet the objective standard. This way of doing things has worked well in the past. These cases are relatively rare, and I think the courts will fulfil their duty.