fixed discard expressions forcing variable removal