Improve inference propagation logic so that unnecessary inference variables are not propagated. Reviewed-by: vromero