DMU: Fixed refactoring oversight in P_ToPtr()

The semantics of looking up a Material by manifest id differ from
those of the DMU API itself. This function must either check that
the given index is non-zero before calling Materials::toManifest()
or handle the exception.

We'll test for a non-zero index specially so that the exception is
otherwise still raised as expected.