When you have 2 or more water bottles in your inventory and try to refill one deeper in the inventory array (or table? basically one lower in your inventory) it will always select the first in the array.
You can still replace the first one with the one you want to refill to get it to work.