Fix asterisk issue better + tests

The solution in #23 for asterisks did not cover `valueMap`. This patch
solves the issue in a more generic way + adds some tests.