public function checkIfSingleton($name, $item) 
    {
        // If the closure is marked as needing to be saved as a singleton, store result. 
        if (isset($this->signaturesToSingletons->$name) and $this->signaturesToSingletons->$name) {
            $this->$name = $item;
            $this->signaturesToSingletons = false;
        }
    }