Stop processing the note section at the end of it.

The code may look past the end of the .note.tag section if there is no version note in it. This patch fixes this b checking if it is still in it before continuing the loop.