Check for wpsc_gateway_container, rather than custom_gateway, when deciding which fields to not hide.  When using only a single payment gateway, custom_gateway does not exist as a class.