@tonymec 
The "new" TODO comment doesnt' explains me why is this checks for.
(And I moved the "new" comment in the if case).

@whimboo 
I still can't answer your original question, therefore I'd like to keep as close the implementation to the SM source as possible.