First pass at proper overloading support

This still could use some more tests, but the role application bug is fixed,
and all other role-related tests seem to be passing, so yay.