mds-kbdc: m + compile-layout: bug fixes and test cases

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: compile-layout: watch out for incomplete function calls

Signed-off-by: Mattias Andrée <maandree@operamail.com>
mds-kbdc: bug fixes and test cases

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