moved the code that will be touched by is-mirage-broken to a separate file, to make it less brittle;