Changed the way labels are generated by using a static counter for
procedure and function entries