It looks as though comments (<!-- [...] ->>) are being included during the harvesting and as a result lat/lon are returning incorrect values (for e.g. https://ca.wikipedia.org/wiki/Llista_de_monuments_d'Arb%C3%BAcies ) [T39422].
These comments should be striped out as part of extract_elements_from_template_param(). The question is whether these, like references, can be assumed to always be at the end of the value?