I’ve outlined this solution and provided source code changes here:
The. NNS dapp code may need to be different now but the code changes to implement this are trivial.