If you go into a factory, select a "prototype" of any kind - including custom, then build and make the factory continue to build them - it will completely ignore the fact you've run out of mineable resources to build the ship and you'll go into negatives for that resource and still continue to build.