Returns the next pattern identifier. The identifier is returned as a reference therefore it can be changed and affects the pattern object.