Clearly a bug in InDesign CC
While working on an Arabic font I need to kern the space U+0020 between certain letters. So the required lookup is added to the font, with instructions to apply kerning whether the preceding letter have marks (above or below) or no marks at all i.e. the kerning is not effected by the preceding letter's marks. The Arabic script is written in right to left direction.
Now the MS Word is showing the correct behavior as shown in the image. The first pair (without marks) and the second pair (with brown marks) both are kerned as instructed by font but the InDesign CC is not showing the correct behavior as InDesign is kerning the first pair (without marks) but not the second one (with marks). This problem appears only when we try to kern space U+0020 while the other adjacent letters kerning works fine as instructed by font with marks or without marks.
Image, test document and test font are attached.
Conclusion: In InDesign, the Arabic kerning works fine between paired letters but if you want to kern space U+0020 then the kerning will not work if the preceding letter contains above or below marks.
For experts: The lookup flag is to process all marks with the exception if the letter after space has below marks. So if the letter after space has below marks then the kerning should not work.