Fix #665: "TypeError: Expected dict, got Headers"
Failed to find the reason behind this bug, so I also failed to write a unittest for it.
Just applying the fix recommended by @ddt-tdd since I can't see any problems with it and two users confirmed this works.