build: Fix "too many arguments" error

Closes #5141