Core: Dropping wrong argument on semaphore check

Fixes #550