A woman who killed herself last year, leaving a note in which she blamed her death on financial stress exacerbated by the bedroom tax, would have been exempt and eligible for a housing benefit refund were she still alive, it has emerged.

Stephanie Bottrill, of Solihull, West Midlands who died last May, would have been exempt from the bedroom tax and liable for a refund of hundreds of pounds under a loophole in the legislation, according to Solihull council sources.

In a note left for her son and daughter before she killed herself, Bottrill explained how having to pay the bedroom tax had made her life impossible, writing: "Don't blame yourself for me ending my life. The only people to blame are the government."

It was revealed this week that a drafting error in the legislation means thousands of working age tenants in social housing are for the time being exempt from the tax if they have lived in the same house since before 1996 and have been claiming housing benefit continuously since then.

A spokesperson for Solihull council said that they had examined Bottrill's files to see if she would have been considered exempt, but were not prepared to comment on an individual case.

However, sources within the council said she had been in the same house since 1995 and she was in continuous receipt of housing benefit until her death in 2013, meaning that Bottrill would have been exempt as she fulfilled both conditions.

The Guardian understands the council believes Bottrill would have been exempt from the bedroom tax.

Bottrill's family were unavailable for comment.

David Jamieson, a Solihull Labour councillor, who knows the family, said in a statement: "Last year, the family and friends of Stephanie were devastated at her suicide.

"Having spoken to her son today, I know he is extremely upset to learn that she should have been exempt.

"The community are now outraged to find that she was exempt. She was being needlessly forced from her home"

A spokesman for the Department for Work and Pensions (DWP) said it would not comment on an individual case. Speaking more widely about the loophole, which the DWP intends to close, the spokesman said that it believed fewer than 5,000 people would be found exempt: "We are looking at this issue carefully and working with local authorities, and we will take any action in due course. We expect very few people to be affected."

But housing experts estimate up to 40,000 households could be affected and the cost of refunds could run into the millions of pounds, along with associated legal costs and compensation for families who had to pay removal companies to move out of their homes. All could be eligible for refunds worth on average at least £640 per claimant, credited to their rent account.

The bedroom tax affects an estimated 660,000 housing benefit claimants living in social housing in the UK.

The policy imposes an penalty of between £14 and £22 a week on working-age tenants deemed to have more bedrooms than they need. Council tenants with spare bedrooms are asked to move to smaller properties or pay additional rent.

Bottrill had the auto-immune system deficiency Myasthenia Gravis, an illness that weakens the muscles. The bedroom tax meant she had to meet a shortfall in her housing benefit £80 per month to remain in her three-bed home, because her son Steven and his younger sister Laura had moved out.

At the time, her son Steven, 27, told reporters: "She never asked for help. Mum kept wrapped up in hot water bottles rather than put the heating on and we didn't know.

"She was fine before the bedroom tax. It was dreamt up in London, by people in offices and big houses. They have no idea the effect it has on people like my mum.

"Going through all her things in the house we grew up in was heartbreaking."

Council housing benefit departments across the country reacted with dismay after the DWP bungle was revealed. Few have been able to find out yet exactly how many households are affected, especially as they are only legally required to keep housing records for seven years.

But anecdotally councils are reporting that as many as 15% of tenants affected by the bedroom tax could be exempt and some may have already moved house or face eviction.

Peter Delamothe, a housing benefit consultant at HBinfo, said one council had identified 250 tenants wrongly ruled liable for the bedroom tax: "This is a shambles caused by the DWP failing to understand the significance of their own legislation".

David Orr, chief executive of the National Housing Federation, said: "The discovery of this loophole nine months in will cause more confusion for tenants, some of whom will have had their housing benefit reduced in error. It also means more work for over-burdened local authorities."