A new approach to the crystal structure prediction of flexible molecules is presented. It is applied to piracetam, whose conformational polymorphs exhibit a variety of hydrogen-bond motifs but lack the intramolecular hydrogen bond found in the gas-phase ab initio optimized conformer. Stable crystal packing can result when favourable intermolecular interactions are made possible when the molecule distorts from the gas-phase conformation. If the resulting intermolecular lattice energy is sufficiently favourable to compensate for the intramolecular energy penalty associated with the suboptimal gas-phase conformation, then the crystal structure may be experimentally feasible. The new approach involves searching for low-energy crystal structures using a large number of rigid conformers, firstly to systematically explore which regions of conformational space could give rise to low-energy hydrogen-bonded crystal structures, and then to refine the search using crystallographic insight to optimize particular intermolecular interactions. The timely discovery of a new polymorph (form IV) by an independent experimental team allowed this approach to be validated by way of a ;blind test' of crystal structure prediction. Form IV was successfully identified as the most favourable computed crystal structure with a conformation very distinct from that in the previously known polymorphs.