At the moment get_corners_in_ref_space sends 4 queries to determine the corner locations in the reference space.
Given we have the machinery to do the transformations locally using affine transformations we should use them in this function to avoid sending unnecesary queries.