ui.refreshable updating the wrong element
### Description

This observation originates from a StackOverflow question: https://stackoverflow.com/questions/76763206/is-it-possible-to-use-widgets-in-nicegui-python

The following code creates two refreshable buttons, each of which refreshes itself and notifies the user about it. But independent of which button is clicked, it always refreshes button B.

```py
class Test:

    def __init__(self, name):
        self.name = name
        self.ui()

    @ui.refreshable
    def ui(self):
        ui.notify(f'Refreshing {self.name}')
        ui.button(self.name, on_click=self.ui.refresh)

Test('A')
Test('B')
```

The problem can be avoided by replacing
```py
on_click=self.ui.refresh
```
with
```py
on_click=lambda: self.ui.refresh()
```

But what is the reason for this mixup, and how to fix it?
diff --git a/nicegui/functions/refreshable.py b/nicegui/functions/refreshable.py
index ad5d8558..a76ccc22 100644
--- a/nicegui/functions/refreshable.py
+++ b/nicegui/functions/refreshable.py
@@ -53,6 +53,15 @@ class refreshable:
         self.instance = instance
         return self
 
+    def __getattribute__(self, __name: str) -> Any:
+        attribute = object.__getattribute__(self, __name)
+        if __name == 'refresh':
+            def refresh(instance=self.instance, *args: Any, **kwargs: Any) -> None:
+                self.instance = instance
+                attribute(*args, **kwargs)
+            return refresh
+        return attribute
+
     def __call__(self, *args: Any, **kwargs: Any) -> Union[None, Awaitable]:
         self.prune()
         target = RefreshableTarget(container=RefreshableContainer(), instance=self.instance, args=args, kwargs=kwargs)
diff --git a/tests/test_refreshable.py b/tests/test_refreshable.py
index 9a934cb2..52a52634 100644
--- a/tests/test_refreshable.py
+++ b/tests/test_refreshable.py
@@ -31,7 +31,7 @@ def test_refreshable(screen: Screen) -> None:
     screen.should_contain('[]')
 
 
-async def test_async_refreshable(screen: Screen) -> None:
+def test_async_refreshable(screen: Screen) -> None:
     numbers = []
 
     @ui.refreshable
@@ -146,3 +146,26 @@ def test_refresh_deleted_element(screen: Screen):
 
     screen.click('Clear')
     screen.click('Refresh')
+
+
+def test_refresh_with_function_reference(screen: Screen):
+    # https://github.com/zauberzeug/nicegui/issues/1283
+    class Test:
+
+        def __init__(self, name):
+            self.name = name
+            self.ui()
+
+        @ui.refreshable
+        def ui(self):
+            ui.notify(f'Refreshing {self.name}')
+            ui.button(self.name, on_click=self.ui.refresh)
+
+    Test('A')
+    Test('B')
+
+    screen.open('/')
+    screen.click('A')
+    screen.should_contain('Refreshing A')
+    screen.click('B')
+    screen.should_contain('Refreshing B')
['nicegui/functions/refreshable.py', 'tests/test_refreshable.py']