I think I discovered my problem: the boolean property returns a string with “true” or “false”, not just a true or false value.
My conditional statement if (state.attr(‘readonly’)) was getting “false” and since that is a real string, it was returning true.
Nothing wrong with rebuildProps, just a javascript error on my part. I changed the conditional to
if (state.attr(‘readonly’) === “true”) and it’s working fine.