[classlib] Fixed unintended swapping of arguments in registerElementClass