Re-add S=$WORKDIR line

And comment why it's there this time