fact : The results form Design Studio do not always exactly match the output generated by the server. With this in mind you need to test on a test server, As not everyone has a seperate server for Production and Testing, you need to find creative ways to fix this.
I normally make a smart select for every serious implementation, this also helps me for testing purposes.
With your production in place after pre-production testing you can just copy the smart select document and place it under a different name in the same directory and use the control panel applet to connect it to a different queue, if possible connect it to a seperate port.
Change all references in the smart select to documents with a special suffix (e.g. change the invoice.dcl to invoiceT.dcl)
You can now test your new versions by copying the original invoice.dcl to invoiceT.dcl and change that document.
Keep in mind that external objects do not change their name with the DCL, and can thus cause problems if you need to change those.