mds-kbdc: m bug fixes + more test cases

Signed-off-by: Mattias Andrée <maandree@operamail.com>