Children may not be locked up for trivial offences, like smoking dagga – court