double env insertion bug hunt