Fix duplicate const qualifier
Separate out mux compilation

This removes the error of an empty compilation unit when threads are not
enabled