Implement on-demand extraction with insufficient test cases (see #14).