Another try to distinguish between static and dynamic scriptElement