Fix bug in imports if several scripts are defined in a single HTML page