Fixing error in underscore template when index did not exist. #1005