App parameters bug

I came across what seems to be a bug related to the way parameters are passed when using hrefs to dynamicPages. If you have multiple hrefs to the same page, but passing different parameters each within their own section, the generated HTML form ends up re-using field identifiers. This causes the second page to be passed the last set of parameters, no matter which href the user clicks.

Here's a basic example app that demonstrates the problem:

definition(
    name: "Test App",
    namespace: "test",
    author: "test",
    description: "Test App",
    category: "Test",
    iconUrl: "",
    iconX2Url: "",
    iconX3Url: ""
)

preferences {
    page(name: "firstPage") {
        section {
            href(
                title: "Click Me 1",
                style: "page",
                page: "secondPage",
                params: [ num: 1 ]
            )
        }
        section {
            href(
                title: "Click Me 2",
                style: "page",
                page: "secondPage",
                params: [ num: 2 ]
            )
        }
    }
    page(name: "secondPage")
}

def secondPage(params) {
    return dynamicPage(name: "secondPage") {
        section {
            paragraph("You clicked button ${params.num}")
        }
    }
}

void installed() {}
void uninstalled() {}
void updated() {}

In this example, I would expect the second page to say "You clicked button 1" when you click the first button, but it doesn't. It says "You clicked button 2" no matter which button you actually clicked because the both <button> elements get named "_action_href_name|secondPage|1" and their corresponding hidden <input>s are both named "params_for_action_href_name|secondPage|1". Because of that, the javascript that handles the click event can't tell them apart and ends up just using the last set of parameters no matter which button was clicked.