allow skipping of terminator character when looking backwards for head to insert callback