bugfix: Use of uninitialized value in substitution iterator