I discovered the same bug when looking at the code when writing #1231.
I chose to go the endian independent route (see https://github.com/D-Programming-Language/phobos/pull/1231/files#L1L128)
I'll gladly remove this change from mine pull request to make the commits more atomic, but I believe this should be changed to the endian independent solution.