Enhancement: Automatically replace the cached node pointer if needed