Canonify promiser name before testing if class is set

Also clean up some code; the function now asserts that
excluded is valid, and there is only one caller.

Add uncanonifed promiser to existing test case.

Fixes Redmine #6561
Merge pull request #1963 from vohi/redmine/6561

Canonify promiser name before testing if class is set