fix phase offset handling during sequence extraction

Closes #447.
add additional test case for phase offset
Merge pull request #448 from satta/phases

fix phase offsets for sequence extraction