It seems like there is a bug in the code generating your lines. Sometimes what works fine in the Global context may not work fine in other contexts like that created by a DynamicModule. This problem is more common when you have mix of Global and Local variables in a DynamicModule.
Another thing to check is whether you are localizing variables in Module or Block and then trying for these local variables to have a Dynamic behavior; that is to say, make sure that variables that will be updated dynamically are either Global variables or variables localized in a DynamicModule.
Finally, quitting the Kernel may also clear previous definitions or assignments that may be part of the problem.