Improve stub file handling of disabled backends