You probably want to break after finding a match. Or call the parent.layout() and simply return.