Fixed monkeypatching dispatch logic. Asserting undefined for values not passed in in related test.

Signed-off-by: Bjorn Westergard <bjornwestergard@Bjorns-MacBook-Pro.local>