Several method security tests rely on method parameters being preserved, in order to demonstrate the difference between relying on runtime reflection and using the @P annotation. Closes gh-15680
Fixes gh-3747