‘high risk’ sex offender avoids gaol