Replaces
seq(0)
or
seq.apply(0)
to
seq.head
if
seq
is not an instance of IndexedSeq.