toto@compaq:~/.xmonad$ ./xmonad --version
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 7
Current serial number in output stream: 8
--version will not work for a user-configured xmonad binary, only for the master one. That is, option checking is not done by the xmonad function but by the Main.hs of the xmonad package, which calls the xmonad function unless options such as --version are passed.
>> toto@compaq:~$ .xmonad/xmonad-x86_64-linux --help
>> X Error of failed request: BadAccess (attempt to access private
>> resource denied)
Likewise, neither does --help work for a custom xmonad binary, only for the main one. You should not, in general, run the custom one directly but instead let the main xmonad do so; there are no promises that the linkage between the two will remain the same (fixing the $PATH issue may require changing it, for example).
--