We were performing operations to patch for missing $result_vector even when one was defined, this was causing bugs on edge cases. Fixes #796 Closes #816