The construction of a mathematical habitus: implications of ability grouping in the middle years