Dirty patch to support generating a complete script