Question regarding daml `Ambiguous occurrence` error

Without going too much into the underlying details, the simple explanation is that data type fields are, in Daml, functions. So you really do have two functions called firstValue in scope.

The solution here is qualified imports, which I’ve explained in more details in the past.