The stencil buffer is only cleared when needed - if you don't do anything in DBPro that requires the use of the stencil buffer then it will leave it uncleared.
[EDIT]Addition to make it clearer - remember that DBPro can't see inside your shader so doesn't know you use the stencil buffer. DBPro needs a command that accesses the non-shader pipeline for it to determine that the stencil buffer is being used.[/EDIT]
The code in the rendering pipeline seems to require shadow shading to be active on at least one object, and that global shadows are also enabled.
That's basically:
set global shadows on ` may not be required as may be on by default
set shadow shading on ObjectID
The object you enable shadow shading on does not actually have to be rendered if it interferes with your scene - you can exclude it if you wish.
Give it a go and let me know how it turns out.