API: Improved get_field_object to better handle values with no field reference

Signed-off-by: Elliot Condon <e@elliotcondon.com>