fixes #2 as reported by @benjhastings
If the engine is not solr/xapian, under 1.2.x it would wrongly assume that the haystack version was 2.x and error about it.
renaming variables to be distinct; see final note in #2 "Also I should probably stop clobbering engine repeatedly, so it's easier to figure out what previous values were."