Guidelines for courts could have led to criminals receiving different sentences depending on gender, age, religion and ethnicity