Fixed shared data problem

Fixed a problem where the global shared data was getting created and destroyed multiple times if there were multiple procedurals in a rib