Thousands of new homes in Wales could be built without sprinklers, despite a law which makes it a compulsory fire safety measure.
Welsh Government head of planning Neil Hemington told AMs sites registered before the law took effect were exempt.
Communities Secretary Carl Sargeant said it was "inappropriate" and vowed to try to "close that loophole".
The Home Builders Federation said such a situation was common when rules change during the building process.
The Equality, Local Government and Communities Committee was taking evidence on Wednesday about fire safety in light of the Grenfell Tower disaster in London.
The fire, in which at least 80 people died, has prompted calls for the UK government to follow the example of Wales, which in 2011 became the first country in the world to pass a law making sprinklers compulsory.
Mr Hemington confirmed that since 2014, sprinklers had to be fitted in all new "high risk" buildings such hotels and student halls of residence, with the measure extended to cover all new buildings in 2016.
When asked by Labour AM Jenny Rathbone if there were any exceptions, Mr Hemington said some of the larger house builders had "pre-registered sites before 2016, which meant they locked themselves into an earlier set of building regulations".
"So some of the houses now which have build regulations process started before 2016 are not including sprinklers," he said.
"You just have to submit a plan with a boundary on it .... it was quite an easy exercise to allow that to happen."
Mr Sargeant, also giving evidence, told the committee: "My understanding is that there are many thousands of homes that are yet to be built which have effectively circumnavigated the sprinkler measure.
"My personal view is that is inappropriate and we've had discussions about how/if we can close that loophole."
Mr Hemington told the committee he would try to get a more precise estimate of the number of houses involved.
The Home Builders Federation said "some homes, the specification and costs for which were already approved under the building regulations before the introduction of the new standards" would not have sprinklers fitted.
It added: "The number of such homes will diminish as existing sites are built out, as is commonplace whenever there are changes to regulations part way through the house building process."