The writer showed ingenuity in creating a surprising ending.
She is well known for her excellent plots and surprising endings.
It would be an ironic though not entirely surprising ending if - its back against the wall - Goldman eventually tries to make this case about him.