Add compilation test

This pull request fixes one issue with the master server and adds a test which found it.