The SNP's policy of limiting P1-3 classes to 18 pupils has been rendered meaningless by a landmark court judgment which puts the maximum size at 30, and even that could be exceeded.
A legal loophole opens the floodgates for determined parents to get their children into popular schools, regardless of Scottish Government targets for class sizes.
It has led to calls for the Government to bring in legislation to back up its demands for smaller class sizes - a call which the Education Secretary appears to be considering, despite the inevitably huge costs to the public purse.
The Court of Session last week upheld a Haddington Sheriff Court ruling that parents of four-year-old twins in East Lothian should be allowed to send them to a school outwith their catchment area.
The authority had refused the placing request because there were already 24 pupils in the class; guidelines issued by the last Scottish Executive set a P1 limit of 25, and to break that barrier would have required an extra teacher to be employed. The sheriff ruled in the parents' favour and Lord Stephen Woolman backed that decision by stating that 1999 regulations capping P1 classes at 30 held sway.
Although he considered the 2007 guidelines limiting P1 classes to 25, further 1999 regulations dictate that children placed in a class after a decision by an appeal committee or sheriff are not included in official class sizes. In its submissions, the authority argued that "the sheriff's approach meant no class-size policy could ever operate, because a sheriff could always add extra pupils. That negated the policy."
Ronnie Smith, general secretary of the Educational Institute for Scotland, said the judgment suggested there was no limit to children who could join a class on appeal, and the statutory limit of 30 for P1-3 could be exceeded.
John Stodter, general secretary of the Association of Directors of Education in Scotland, said the authority's case fell down because it relied only on the argument that it would have to employ an extra teacher. A more robust argument would focus on the detrimental effects of a larger class on pupils.
He saw two ways out for the Government - either seek "strong legal opinion" to provide clear advice to councils; or legislate.
The TESS has learnt that Andrew Miller, West Lothian Council's executive councillor for education in the SNP-dominated administration, has asked Cosla to call on the Scottish Government for legislation that will allow councils to achieve its P1-3 target class sizes of 18.
Judith Gillespie, development manager of the Scottish Parent Teacher Council, described the situation as a "mess". It was no longer tenable for the Government to talk of smaller classes as an aspiration but put the onus on authorities to deliver. It would have to introduce "very clear legislation", and put up the money to fund smaller classes.
Education Secretary Fiona Hyslop appears to be in two minds about whether to legislate. At last week's education committee, she said: "Fact: we do not need legislation to reduce class sizes. However, placing requests may put pressure on some - albeit few -classes; therefore, we will keep the situation under review."
In an answer to a parliamentary question from former Tory leader David McLetchie on whether P1-P3 class sizes could be achieved without legislation, she said the Government would "continue to monitor the situation".