modules: check if table is present before trying to create it.
This solves an issue if there are still tables and the module is re-installed.
(cherry picked from commit 1103c710480bfd3914842a56da01c9b2701d19cb)
core: more error messages instead of match error.
(cherry picked from commit 25273064cbd9a60150bb043e519c878c80830367)