compiler: Fix unnecessary bytecodes for scalar

Commit b1bbb89 introduced a temporary variable for assignments where
the vector appears both on the left and on the right. But this is
not needed for scalars. Fix this.