In my particular case, this piece of XML in the .csproj file was causing the problem:
<ExcludeFromPackageFolders Include="TestFolder">
<FromTarget>Some message</FromTarget>
</ExcludeFromPackageFolders>
"Sync with Active Document" wouldn't work for any of the files in the TestFolder folder. Commenting that bit out seems to make it work again.
Obviously in certain cases that bit might be there for a reason so just deleting it might not be the proper solution so whoever might be reading this, you have to be the judge of that obviously.
Just writing this answer down just in case someone is having a similar problem, 'cause I definitely was getting annoyed for a long time because of this.