Cast query limits to int in Record search functions
Put details-shim in its place
Change G::croak() to not die by default