Add regression test for #5237

This PR adds a test for a regression in `ServiceManager::canCreateServiceWithName()` introduced in #4285 and fixed by #5237.

@weierophinney
any chance to include both this and #5237 in 2.2.5? The bug is quite a nasty one.