Only three days before she was due to shoot Your Sister's Sister, the American director Lynn Shelton heard news that made her heart sink: Rachel Weisz was dropping out to shoot another movie.
After eight months developing the characters with her three central actors - the others being Emily Blunt and Mark Duplass - it looked like a fatal blow to the film.
''I really thought it was dead,'' Shelton says. ''We had no leeway at all. We were going to lose our crew, we were going to lose the location, the other actors had to fly off and work on other projects. It was just this two-week window that we had.''
But with the crew already on set - on an island, no less - the producers encouraged Shelton to think of a possible replacement for Weisz. They came up with Rosemarie DeWitt (Midge in Mad Men), who, as a fan of Shelton's previous film, the Sundance prize-winning bromance Humpday, quickly said yes despite being deep into filming The United States of Tara with Toni Collette.
When the Tara producers juggled their schedule to free her up, Shelton was - astonishingly - able to start filming on schedule.
Under such circumstances, Your Sister's Sister is a surprisingly effective film - a droll indie dramedy about three characters trying to sort out the difference between friendship and romance.
It centres on Jack (Duplass), depressed after his brother's death, being sent by his friend Iris (Blunt) to her family's cabin to recuperate. But with her sister Hannah (DeWitt) unexpectedly there recovering from a break-up, things rapidly get messy.
Shelton sees it as a movie about the flaws we all share.
''We're all of us cracked vessels,'' she says. ''We all make mistakes. These are three people who I think are really good people at heart and they're doing their best but they're making a terrible mess of things along the way.
''Ultimately, I'm hoping the audience will love them almost because of their flaws … and recognise themselves and their friends and their family.''
Your Sister's Sister is a largely improvised film, shot collaboratively at (mostly) one location for just $US125,000, with a small cast and crew who get a basic fee and share any revenue.
''I'm looking for the spark of freshness that happens and the surprises that can occur in improvisation,'' Shelton says.
''I want it to feel like real people onscreen and real conversations, like we're dropping into these people's real lives and then flying out again after getting a little glimpse into … their worlds.''
The idea for the film came from Duplass, who starred in Humpday and has directed with his brother, Jay, such indie dramedies as Cyrus and Jeff, Who Lives at Home.
''He called and said, 'Look, I have this idea that was in the vault of potential Duplass brothers films and we realised we're not going to be directing it any time soon but I still think it's a good idea,''' Shelton says.
''I was thrilled that he wanted to go into the fray with me again and I really thought that it would provide good territory for interpersonal dynamics, which is what I'm interested in as a director.''
Shelton switched the idea from a mother-daughter to a sister-sister love triangle, allowing ''two parallel sibling relationships'' when the unseen dead brother factors in.
For DeWitt, being involved in the film meant a quick decision. She took a call about Your Sister's Sister on a Saturday, read the treatment on Sunday and - after buying presents for the Tara producers for juggling her schedule - flew to the set on Tuesday after a day of TV filming. Then she shuttled between sets on opposite coasts for two weeks.
''It kind of really worked for the character because she was wrecked by getting out of this relationship and hitchhiking up to the lake house,'' she says.
As soon as she heard about the role, DeWitt thought it would be worth all the logistical drama.
''I knew these were all people that I really wanted to work with … I was so excited about it but it was a little like jumping off a high cliff with no safety wire.''
DeWitt thinks Shelton had a strong sense the actors would get on well together during the shoot.
''It was like throwing a great dinner party,'' she says. ''Those two [Blunt and Duplass] are going to be keepers in my life.''
YOUR SISTER'S SISTER
GENRE Droll indie drama.
CRITICAL BUZZ A story with heart about a man caught between two sisters.
STARS Emily Blunt, Mark Duplass, Rosemarie DeWitt.
DIRECTOR Lynn Shelton.