STORM-505: Fix debug string construction

This pull request supersedes #266.