Fix project.clear() so it removes all layers properly.