lima/ppir: lower selects to scalars