Bugfix + completed tests for amd modules preprocessing