#5089 hack-fix assemble module

Follow on from #5057 and #5089

Needs a review, but it's working for me at the moment

@bcoca thoughts?