Fix #8243 and add scalar division for Triangular