Compile in two passes and renamed slices into functions until it's not too late.