PHILADELPHIA (AP) — Pope Francis refined his vision for the church last week when he said long-spurned divorced and remarried Catholics should be welcomed with “open doors.” And he has famously parsed centuries of thought on homosexuality into a five-word quip: “Who am I to judge?”

Yet the Archdiocese of Philadelphia opened its door only briefly when married gay teacher Margie Winters, trailed by supporters, arrived Monday with 23,000 petitions seeking reinstatement to her job at a Catholic elementary school.

“The school and the Sisters of Mercy allowed me to work there for eight years. Once the diocese was notified, something changed,” said Winters, who was disappointed that a security guard, and not a church official, took her petitions at the chancery door.

Winters, 50, lost her job at Waldron Mercy Academy in June after a parent complained about her 2007 marriage to a woman. Her case highlights the shifting fault lines over gays in the church — and in church workplaces — just before the pope visits Philadelphia next month for the World Meeting of Families.

Jesuit-run Fordham University is standing by its theology chairman whose same-sex marriage made the New York Times wedding section this year, while at Seton Hall University, the archdiocese of Newark, N.J., recently reassigned the head chaplain after the priest denounced gay bullying and later came out as gay.

Around the country, more than 50 people have reported losing their jobs at Catholic institutions since 2010 over their sexual orientation or identity, according to New Ways Ministries, an advocacy group for gay, lesbian, bisexual and transgender Catholics based in Mount Ranier, Maryland.

Philadelphia Archbishop Charles J. Chaput, wading into the issue amid Winters’ case, stressed that Catholic schools are responsible for “teaching and witnessing the Catholic faith in a manner true to Catholic belief,” referring to the church’s condemnation of homosexual activity. He said the Mercy officials showed “character and common sense” for sticking to church teachings.

“A great number of people like to pick apart the remarks of the Holy Father and manipulate them to drive their own agendas,” his spokesman, Ken Gavin, said Thursday in response to questions about the pope’s latest comments. “Keeping the doors open does not mean that basic church teachings will be changed. … The Holy Father has not given any signals that teaching on the meaning and sanctity of marriage will be changing.”

Winters and her wife, Andrea Vettori, clinical director at a health center for the homeless, met in their mid-30s when they entered the Sisters of Mercy as candidates for religious life. Instead, they felt called to build a life with each other, and married in Massachusetts in May 2007.

Winters was hired that August as director of religious education, leading service and outreach efforts at the school in suburban Merion Station. On the advice of her principal, she was open about her marriage with colleagues, but kept mum around students and families. Many came to see her as the heart of the school.

“She was really able to instill in the kids that helping those less fortunate is something you do every day. It wasn’t just something she would pull together on a holiday,” said parent Jerry Dever, a Philadelphia lawyer with two children at Waldron.

Waldron is run by the Mercy sisters, independent of the archdiocese, but the local church has the power to pull the “Catholic identity” of any institution seen to stray from church teaching. Gavin said that no such threat was made to Waldron.

In a pained July 3 letter to parents that noted Winters’ “amazing contribution” to the school community, principal Nell Stetser said the nuns must recognize “the authority of the archbishop of Philadelphia, especially in the teaching of religion.”

“My hope is the pain we experience today adds to the urgency of engaging in an open and honest discussion about this and other divisive issues at the intersection of our society and our church,” she wrote.

With same-sex marriage now legal across the U.S., more gays employed in church settings are likely to get married and live openly. That brings more potential conflict for their employers, who can claim a religious exemption from anti-discrimination laws. Winters hopes to sneak in a word with Pope Francis on his visit and push for a moratorium on LGBT firings.

“The pattern that I see is that schools themselves, many of them, have been supportive of their gay and lesbian employees, even those who have chosen to marry. The problem always arises when something becomes public, or a parent complains,” said Francis DeBernardo, executive director of New Ways Ministries. “It’s bringing out the worst in the leadership, and it’s bringing out the best in the people.”

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.