While working on #7801, spotted that you could use "bad" imports in the front end code and nothing picked it up. So, added this with Claude's help.