Calculate offset correctly in inline slugs

The special case where we don't count text inside slugs was removed
in Ia1e4785e but not restored.

Change-Id: Ia1e4785e2c456a0391ff2af8af29ec5061f8d0b4
Merge "Calculate offset correctly in inline slugs"