The example code originally checked all 32 memory types even if the instance returned fewer memory types.