We predict that the near-field radiative heat-transfer rate between a cylinder and a perforated surface depends nonmonotonically on their separation. This anomalous behavior, which arises due to evanescent-wave effects, is explained using a heuristic model based on the interaction of a dipole with a plate. We show that nonmonotonicity depends not only on geometry and temperature but also on material dispersion--for micron and submicron objects, nonmonotonicity is present in polar dielectrics but absent in metals with small skin depths.