Corrected the recursive resolve case for when there are multiple keys to distinguish