Subpixel localization TrackMate

The LoG / DoG and the find maxima detector in TrackMate are using the SubpixelLocalization class of imglib2.
I was wondering what happens if a position on the border of the image is refined? For me it seems that the original position is returned?

It depends on if and how the source image is extended.

The subpixel localization code might give up if it moves to an invalid region. Then it returns the non refined position.