opt_dest should be assigned to not pushed
Merge pull request #2093 from bjornharrtell/fix_opt_dest2

Assign to provided array instead of pushing when getting a linestring midpoint.