Fix false positive in memory efficiency test.

Fixes issue #1298.