Fixed PC race condition in semantic highlighting

Fixes #1001623