Blade compiler improvements

Thanks to @dyatlov and others.