Fix nil engine returned by import-once importer

Fixes #1868. @chriseppstein not exactly sure the best way to include this in tests, or whether there's a better spot for the substitution.