Facing issues with shape codes in CivilConnection

Hi,
I am facing some strange issues, while working with CivilConnection - appliedsubassemblyshapes node in Revit.

At a station(say x), somewhere in the middle of baseline region, there were few additional shape codes present. However, i fixed it with writing a python script, to find and remove the additional shape codes.
But now, I find that at some other station(say y and in different civil3d model), there are few shape codes missing.

This leads to creation of some strange localized geometry in Revit.

Does any one know, what might be the reason behind this?