[PLAT-4914] Making swap theta functions return a single-valued result