People don't often admit to making mistakes here, but here's one – somehow I missed the bottom layer of cloth *completely* while putting in a buttonhole! I think it must have been how I was holding it... The machine stitch also didn't manage to keep it involved!
Any ideas for how to fix this to stop the back fraying? Unfortunately it is (Murphy's Law) the top buttonhole so will see a lot of use.
I wondered about fabric glue. Not too bothered about what it looks like as it'll be hidden!