BUG: Fix raising exception on invalid assignment from sequence

Closes gh-4024