Small fixes for optimize imports tests.