Phase loops with multiple solutions are observed in calculations of lattice density-functional theory. It is shown that the standard numerical methods for solving such problems distort the solution. A technique is proposed to obtain multiple solutions for phase equilibria in confined fluids. This method gives the entire phase equilibrium curve, including hidden points which determine wetting transitions and capillary condensation. A synergetic effect of walls on adsorption in nanoscale pores is analyzed. [S1063-651X(99)14711-1].