Fix inplace linalg.dot

Fixes  `linalg.dot` so it works inplace again.