Rework get_transient_expiration() to fix #3