Fix some empty GET param cases (with tests)

Sorry about the (long) delay, but this is finally rebased properly...