Fix some problems with the discoverContextAvailability operation