Well, if several tries at 1) Tap Setup, 2) enter 00051 quickly doesn't cause the power to toggle, then I suspect that we're not getting setup code 30842 assigned to AUX for the test.
So, let's check.
1) Tap AUX (it should blink once)
2) Press and hold Setup until AUX LED blinks twice. When you press Setup AUX should immediately blink, and then after about 5 seconds, blink twice more.
3) Enter 30842 The remote should blink AUX on each of the 5 button taps, and then blink AUX twice after you enter the "2".
Make sure that the remote is doing all this blinking, and that it is the AUX LED that blinks.
Now let's blink back the setup code that you've just assigned.
1) Tap AUX (it should blink once)
2) Press and hold Setup until 2 blinks
3) Enter 990 (2 blinks of AUX)
4) Tap digit button 1, then count the blinks (should be 3)
5) Tap digit button 2, count the blinks (should be zero)
6) continue for digit buttons 3-5. (should be 8,4, and 2 blinks)
Assuming that you do blink back 30842, tapping the Power button should shut the unit off. If it does, turn it back on, then tap Setup and enter 00170 while aiming the remote at the Onkyo. This should also shut off the unit, and if it does, that shows that you're doing the test correctly. Once you've got that going, tap Setup and 00051. That should toggle the power.
At that point you can go on to assigning 00051 to the Power button. The expected behavior is that tapping the Power button will toggle power on the unit.
It should still toggle power even after you switch back to 30135, because the remotes are designed to give priority to EFC assignments.