Are either of you familiar with debugging JBoss AS source? If so the easiest thing would be to set a breakpoint and check the values being passed into the validatePassword of UsernamePasswordLoginModule and verify that they are as expected (To be getting the error we see one of them must be wrong)
If not I will see if we can use byteman to output the values for us to vefify.